Class AssignIfUnsetBlockGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.AssignIfUnsetBlockGenerator
- All Implemented Interfaces:
Function<AssignIfUnsetDetails, List<IRInstr>>
final class AssignIfUnsetBlockGenerator
extends AbstractGenerator
implements Function<AssignIfUnsetDetails, List<IRInstr>>
Assign-if-unset 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 ASSIGN_IF_UNSET chain type
Assign-if-unset 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
constantCopyOnAccessLoader, debugInfoCreator, instructionBuilder, MAX_MESSAGE_LENGTH, stackContext, synthesisedCallMetaData, typeNameOrException -
Constructor Summary
ConstructorsConstructorDescriptionAssignIfUnsetBlockGenerator(IRGenerationContext stackContext, ControlFlowChainGenerator controlFlowChainGenerator, AssignExpressionToSymbol assignExpressionToSymbol, StatementOwnedCloseables ownedCloseables) -
Method Summary
Methods inherited from class AbstractGenerator
addCoverageProbe, createTempVariable, createTempVariableFromContext, extractReturnType, getRecordedSymbolOrException, processBlockStatements, processBlockStatements, truncateMessage, truncateMessage
-
Constructor Details
-
AssignIfUnsetBlockGenerator
public AssignIfUnsetBlockGenerator(IRGenerationContext stackContext, ControlFlowChainGenerator controlFlowChainGenerator, AssignExpressionToSymbol assignExpressionToSymbol, StatementOwnedCloseables ownedCloseables)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<AssignIfUnsetDetails, List<IRInstr>>
-