Class FunctionInstance
java.lang.Object
org.ek9lang.compiler.phase7.support.FunctionInstance
THE reading of how a function call finds the function instance it invokes - use this, never read the
DELEGATE_CALL mark by hand. Phase 3 marks a call whose function comes from a variable (or the result of a
chained call) rather than being named; every call generator asks here.-
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryInstrconstructedAsValue(IRGenerationContext stackContext, FunctionSymbol functionSymbol, String resultVariable, DebugInfo debugInfo) THE lowering of a function CONSTRUCTED as a value -countOf() of String, a parameterised generic function - to its singleton instance: aFUNCTION_INSTANCE, never an invocation.static booleanisDelegateCall(ISymbol recordedCallSymbol) True when the recorded call symbol is a delegate call: the function instance is loaded from a variable (or is the result of an inner call) instead of being the named function's singleton.
-
Method Details
-
isDelegateCall
True when the recorded call symbol is a delegate call: the function instance is loaded from a variable (or is the result of an inner call) instead of being the named function's singleton.- Parameters:
recordedCallSymbol- the symbol recorded against the call, which may be null or not a call
-
constructedAsValue
public static MemoryInstr constructedAsValue(IRGenerationContext stackContext, FunctionSymbol functionSymbol, String resultVariable, DebugInfo debugInfo) THE lowering of a function CONSTRUCTED as a value -countOf() of String, a parameterised generic function - to its singleton instance: aFUNCTION_INSTANCE, never an invocation. The type is named throughresolveTypeNameso that inside a Scenario-3 monomorphised generic body a conceptual parameterisation (Maker of T) is emitted as its concrete, code-generated counterpart. (ExprInstrGenerator.processFunctionConstructionis the expression-context copy that should delegate here.)
-