Class AbstractShortCircuitGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.AbstractShortCircuitGenerator
- All Implemented Interfaces:
Function<ExprProcessingDetails,
List<IRInstr>>
- Direct Known Subclasses:
ShortCircuitAndGenerator
,ShortCircuitOrGenerator
abstract class AbstractShortCircuitGenerator
extends AbstractGenerator
implements Function<ExprProcessingDetails,List<IRInstr>>
Both AND/OR are very similar in processing, the only real differences are:
What operation to call and the op code to generate.
What operation to call and the op code to generate.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractShortCircuitGenerator
(IRGenerationContext stackContext, RecordExprProcessing recordExprProcessing, Function<LogicalDetails, IRInstr> logicalOperation) -
Method Summary
Modifier and TypeMethodDescriptionapply
(ExprProcessingDetails details) protected abstract CallDetails
getCallDetails
(String lhsVariable, String rhsVariable) Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
AbstractShortCircuitGenerator
AbstractShortCircuitGenerator(IRGenerationContext stackContext, RecordExprProcessing recordExprProcessing, Function<LogicalDetails, IRInstr> logicalOperation)
-
-
Method Details
-
getCallDetails
-
apply
- Specified by:
apply
in interfaceFunction<ExprProcessingDetails,
List<IRInstr>>
-