Class CallInstr

java.lang.Object
org.ek9lang.compiler.ir.IRInstr
org.ek9lang.compiler.ir.CallInstr
All Implemented Interfaces:
INode

public final class CallInstr extends IRInstr
Specialized IR instruction for method calls (CALL, CALL_VIRTUAL, CALL_STATIC, CALL_DISPATCHER).

This instruction type handles ALL EK9 method calls and operators. EK9 operators like a + b become method calls like a._add(b).

  • Method Details

    • call

      public static CallInstr call(String result, DebugInfo debugInfo, CallDetails callDetails)
      Create method call with complete type information from resolved symbols: CALL result = object.method(args...)
    • callVirtual

      public static CallInstr callVirtual(String result, DebugInfo debugInfo, CallDetails callDetails)
      Create virtual method call with complete type information: CALL_VIRTUAL result = object.method(args...)
    • callStatic

      public static CallInstr callStatic(String result, DebugInfo debugInfo, CallDetails callDetails)
      Create static method call with complete type information: CALL_STATIC result = Type.method(args...)
    • callDispatcher

      public static CallInstr callDispatcher(String result, DebugInfo debugInfo, CallDetails callDetails)
      Create dispatcher method call with complete type information: CALL_DISPATCHER result = object.dispatcherMethod(args...)
    • operator

      public static CallInstr operator(String result, DebugInfo debugInfo, CallDetails callDetails)
      Create EK9 operator call with complete type information: CALL result = object._operatorMethod(args...) Common operators: _add, _sub, _eq, _lt, _addAss, _isSet, etc.
    • constructor

      public static CallInstr constructor(String result, DebugInfo debugInfo, CallDetails callDetails)
      Create constructor call with complete type information: CALL result = Type.<init>(args...)
    • accept

      public void accept(INodeVisitor visitor)
      Specified by:
      accept in interface INode
      Overrides:
      accept in class IRInstr
    • getTargetObject

      public String getTargetObject()
    • getMethodName

      public String getMethodName()
    • getArguments

      public List<String> getArguments()
    • isConstructorCall

      public boolean isConstructorCall()
      Check if this is a constructor call.
    • getTargetTypeName

      public String getTargetTypeName()
      Get the EK9 format target type name (e.g., "org.ek9.lang::Stdout").
    • getParameterTypes

      public List<String> getParameterTypes()
      Get parameter type names in EK9 format (e.g., ["org.ek9.lang::String"]).
    • getReturnTypeName

      public String getReturnTypeName()
      Get return type name in EK9 format (e.g., "org.ek9.lang::Void").