Class DelegateLoad
java.lang.Object
org.ek9lang.compiler.phase7.support.DelegateLoad
THE load of a wrapper's
delegate field, borrowed for the scope - shared by the constrained types
(ConstrainedTypeInstrs) and the Scenario-2 wrappers (Scenario2WrapperHelper), which each had a
byte-identical private copy (DFN-3, MONO-8). Hold one and use it; never hand-write the LOAD_FIELD and its borrow.
delegateVar = LOAD_FIELD objectVar.delegate (ownerType -> delegateType)
borrowed in scopeId (OwnershipStatements.borrowInScope(String, String, DebugInfo))
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DelegateLoad
public DelegateLoad()
-
-
Method Details
-
borrowed
public String borrowed(List<IRInstr> instructions, Supplier<String> newTemp, String objectVar, String ownerType, String delegateType, String scopeId, DebugInfo debugInfo) LoadobjectVar.delegateinto a new temporary, borrowed forscopeId.- Parameters:
instructions- the list to append tonewTemp- the generation's temporary namer (called once, before the load)objectVar- the wrapper valueownerType- the wrapper's type (the field's owner)delegateType- the delegate field's typescopeId- the scope that borrows the delegatedebugInfo- debug information- Returns:
- the temporary holding the delegate
-