Class FunctionInstance

java.lang.Object
org.ek9lang.compiler.phase7.support.FunctionInstance

public final class FunctionInstance extends Object
THE lowering of a function CONSTRUCTED as a value to its singleton instance - hold one and use it. Whether a call invokes a function instance loaded from a variable rather than a named singleton is IsDelegateCall.
  • Constructor Details

    • FunctionInstance

      public FunctionInstance()
  • Method Details

    • constructedAsValue

      public 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: a FUNCTION_INSTANCE, never an invocation. The type is named through resolveTypeName so that inside a Scenario-3 monomorphised generic body a conceptual parameterisation (Maker of T) is emitted as its concrete, code-generated counterpart. (ExprInstrGenerator.processFunctionConstruction is the expression-context copy that should delegate here.)