Class GuardedAssignmentBlockGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.GuardedAssignmentBlockGenerator
- All Implemented Interfaces:
Function<GuardedAssignmentDetails, List<IRInstr>>
final class GuardedAssignmentBlockGenerator
extends AbstractGenerator
implements Function<GuardedAssignmentDetails, List<IRInstr>>
Guarded assignment generator using unified CONTROL_FLOW_CHAIN approach.
This generator has been migrated to use the unified control flow: 1. Delegates to injected ControlFlowChainGenerator for actual IR generation 2. Maintains backward compatibility with existing call sites 3. Uses CONTROL_FLOW_CHAIN with GUARDED_ASSIGNMENT chain type
Guarded assignment becomes a CONTROL_FLOW_CHAIN with condition: if (!lhsSymbol?) then assign else do nothing
PHASE 7 REFACTORING COMPLETE: Now accepts injected ControlFlowChainGenerator for maximum object reuse.
-
Field Summary
Fields inherited from class AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext -
Constructor Summary
ConstructorsConstructorDescriptionGuardedAssignmentBlockGenerator(IRGenerationContext stackContext, ControlFlowChainGenerator controlFlowChainGenerator, AssignExpressionToSymbol assignExpressionToSymbol) -
Method Summary
Methods inherited from class AbstractGenerator
createTempVariable, createTempVariableFromContext, extractReturnType, getRecordedSymbolOrException
-
Constructor Details
-
GuardedAssignmentBlockGenerator
public GuardedAssignmentBlockGenerator(IRGenerationContext stackContext, ControlFlowChainGenerator controlFlowChainGenerator, AssignExpressionToSymbol assignExpressionToSymbol)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<GuardedAssignmentDetails, List<IRInstr>>
-