Class ShortCircuitOrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.AbstractShortCircuitGenerator
org.ek9lang.compiler.phase7.generator.ShortCircuitOrGenerator
- All Implemented Interfaces:
Function<ExprProcessingDetails,
List<IRInstr>>
Generates IR instructions for Boolean OR operations using LOGICAL_OR_BLOCK pattern.
This generator creates a declarative logical operation block containing: 1. Left operand evaluation and primitive boolean condition 2. Right operand evaluation instructions (for non-short-circuit path) 3. Result computation instructions (EK9 Boolean._or() call) 4. All memory management
Backends can choose between short-circuit and full evaluation strategies based on the usage context and target-specific optimizations.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
ConstructorsConstructorDescriptionShortCircuitOrGenerator
(IRGenerationContext stackContext, RecordExprProcessing recordExprProcessing) -
Method Summary
Modifier and TypeMethodDescriptionprotected CallDetails
getCallDetails
(String lhsVariable, String rhsVariable) Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractShortCircuitGenerator
apply
Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
ShortCircuitOrGenerator
public ShortCircuitOrGenerator(IRGenerationContext stackContext, RecordExprProcessing recordExprProcessing)
-
-
Method Details
-
getCallDetails
- Specified by:
getCallDetails
in classAbstractShortCircuitGenerator
-