Class CaptureStores
SLOT_ASSIGN this.x, x [copy, init] (OwnershipStatements.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).
Both dynamic-construct generators emit their capture constructor's stores through here, and both put them before
_i_init, while the constructor's body is built: a dynamic function's through
processSyntheticConstructor (DFN-6 step 2, IR tidy W3.3b), a dynamic class's in THE capture constructor
(support/IsCaptureConstructor) - the synthetic one the same way, an explicit one by
OperationDfnGenerator just after its super(...) call (or first, when it has none or delegates with
this(...)). Each captured value comes from the capture constructor's parameter AT ITS
POSITION: an explicit capture constructor (the tuple's 'interface') names its parameters as it wishes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe stores of each captured variable's property from the capture constructor's parameter at the same position.The stores of a construct whose capture constructor's parameters are its captured variables themselves (a dynamic function's, or a dynamic class's synthetic one).
-
Constructor Details
-
CaptureStores
public CaptureStores()
-
-
Method Details
-
of
The stores of a construct whose capture constructor's parameters are its captured variables themselves (a dynamic function's, or a dynamic class's synthetic one).- Parameters:
capturedVars- the construct's captured variables, in capture orderdebugInfo- debug information for each instruction- Returns:
- the store of every captured variable into its property
-
of
The stores of each captured variable's property from the capture constructor's parameter at the same position.- Parameters:
capturedVars- the construct's captured variables, in capture orderparameters- the capture constructor's parameters, one per captured variable, in the same orderdebugInfo- debug information for each instruction- Returns:
- the store of every captured variable into its property
-