Class CallInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.CallInstrGenerator
- All Implemented Interfaces:
BiFunction<EK9Parser.CallContext, VariableDetails, List<IRInstr>>
public final class CallInstrGenerator
extends AbstractGenerator
implements BiFunction<EK9Parser.CallContext, VariableDetails, List<IRInstr>>
Generates IR instructions for function/method calls.
Handles:
- Function calls: functionName(args...)
- Method calls: object.methodName(args...)
- Parameter evaluation with proper memory management
- Return type resolution and metadata extraction
- CallInstr.call generation for function invocations
-
Field Summary
Fields inherited from class AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext -
Constructor Summary
ConstructorsConstructorDescriptionCallInstrGenerator(IRGenerationContext stackContext, GeneratorSet generators) Constructor accepting GeneratorSet for unified access to all generators. -
Method Summary
Modifier and TypeMethodDescriptionapply(EK9Parser.CallContext ctx, VariableDetails resultDetails) Methods inherited from class AbstractGenerator
createTempVariable, createTempVariableFromContext, extractReturnType, getRecordedSymbolOrExceptionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
CallInstrGenerator
CallInstrGenerator(IRGenerationContext stackContext, GeneratorSet generators) Constructor accepting GeneratorSet for unified access to all generators.
-
-
Method Details
-
apply
- Specified by:
applyin interfaceBiFunction<EK9Parser.CallContext, VariableDetails, List<IRInstr>>
-