Class CaptureStores
java.lang.Object
org.ek9lang.compiler.phase7.support.CaptureStores
THE stores of a dynamic class's or dynamic function's captured values into its fields (DFN-6): each captured
variable, in order, is a property of the construct - a slot its OBJECT owns - and takes its own reference to the
value captured:
SLOT_ASSIGN this.x, x [copy, init] (VariableMemoryManagement.propertyAssigned(String, String, boolean, DebugInfo)),
lowered to STORE this.x, x; RETAIN this.x.
The reference is taken THROUGH THE FIELD just stored, never RETAIN x: the stores go before the
constructor's _i_init call (initialisers may read a capture), and in an explicit constructor that is BEFORE
the body declares its parameter x. A native back end resolves a RETAIN x there to x's slot, not yet
stored - so the field took no reference and the body's own this.x = x then freed the caller's value
(tupleDynamicClassBasic / CustomConstructor, family 6).
-
Method Summary
-
Method Details
-
of
-