Class FunctionCallProcessor
java.lang.Object
org.ek9lang.compiler.phase7.generator.FunctionCallProcessor
- All Implemented Interfaces:
BiFunction<CallProcessingDetails, Function<ExprProcessingDetails, List<IRInstr>>, List<IRInstr>>
public final class FunctionCallProcessor
extends Object
implements BiFunction<CallProcessingDetails, Function<ExprProcessingDetails, List<IRInstr>>, List<IRInstr>>
Unified function call processor using CallDetailsBuilder for method resolution and promotion.
Handles both statement and expression contexts with appropriate memory management.
This component replaces the duplicate function call logic in CallInstrGenerator and ExprInstrGenerator, providing consistent method resolution and automatic promotion across all function call contexts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(CallProcessingDetails details, Function<ExprProcessingDetails, List<IRInstr>> exprProcessor) Apply function call processing with an expression processor function.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface BiFunction
andThen
-
Constructor Details
-
FunctionCallProcessor
-
-
Method Details
-
apply
public List<IRInstr> apply(CallProcessingDetails details, Function<ExprProcessingDetails, List<IRInstr>> exprProcessor) Apply function call processing with an expression processor function. This avoids circular dependencies by accepting the expression processor as a parameter.- Specified by:
apply
in interfaceBiFunction<CallProcessingDetails, Function<ExprProcessingDetails, List<IRInstr>>, List<IRInstr>>
-