Class CallInstr
java.lang.Object
org.ek9lang.compiler.ir.IRInstr
org.ek9lang.compiler.ir.CallInstr
- All Implemented Interfaces:
INode
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 Summary
Modifier and TypeMethodDescriptionvoid
accept
(INodeVisitor visitor) static CallInstr
call
(String result, DebugInfo debugInfo, CallDetails callDetails) Create method call with complete type information from resolved symbols: CALL result = object.method(args...)static CallInstr
callDispatcher
(String result, DebugInfo debugInfo, CallDetails callDetails) Create dispatcher method call with complete type information: CALL_DISPATCHER result = object.dispatcherMethod(args...)static CallInstr
callStatic
(String result, DebugInfo debugInfo, CallDetails callDetails) Create static method call with complete type information: CALL_STATIC result = Type.method(args...)static CallInstr
callVirtual
(String result, DebugInfo debugInfo, CallDetails callDetails) Create virtual method call with complete type information: CALL_VIRTUAL result = object.method(args...)static CallInstr
constructor
(String result, DebugInfo debugInfo, CallDetails callDetails) Create constructor call with complete type information: CALL result = Type.<init>(args...)Get parameter type names in EK9 format (e.g., ["org.ek9.lang::String"]).Get return type name in EK9 format (e.g., "org.ek9.lang::Void").Get the EK9 format target type name (e.g., "org.ek9.lang::Stdout").boolean
Check if this is a constructor call.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.Methods inherited from class org.ek9lang.compiler.ir.IRInstr
addOperand, addOperands, equals, getDebugInfo, getOpcode, getOperands, getResult, hashCode, hasResult, isControlFlow, isMemoryManagement, isMethodCall, toString
-
Method Details
-
call
Create method call with complete type information from resolved symbols: CALL result = object.method(args...) -
callVirtual
Create virtual method call with complete type information: CALL_VIRTUAL result = object.method(args...) -
callStatic
Create static method call with complete type information: CALL_STATIC result = Type.method(args...) -
callDispatcher
Create dispatcher method call with complete type information: CALL_DISPATCHER result = object.dispatcherMethod(args...) -
operator
Create EK9 operator call with complete type information: CALL result = object._operatorMethod(args...) Common operators: _add, _sub, _eq, _lt, _addAss, _isSet, etc. -
constructor
Create constructor call with complete type information: CALL result = Type.<init>(args...) -
accept
-
getTargetObject
-
getMethodName
-
getArguments
-
isConstructorCall
public boolean isConstructorCall()Check if this is a constructor call. -
getTargetTypeName
Get the EK9 format target type name (e.g., "org.ek9.lang::Stdout"). -
getParameterTypes
-
getReturnTypeName
Get return type name in EK9 format (e.g., "org.ek9.lang::Void").
-