Class VariableOnlyDeclInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.AbstractVariableDeclGenerator
org.ek9lang.compiler.phase7.generator.VariableOnlyDeclInstrGenerator
- All Implemented Interfaces:
Function<EK9Parser.VariableOnlyDeclarationContext, List<IRInstr>>
public final class VariableOnlyDeclInstrGenerator
extends AbstractVariableDeclGenerator
implements Function<EK9Parser.VariableOnlyDeclarationContext, List<IRInstr>>
Creates IR instructions for variable only declarations.
Uses REFERENCE instructions for all variables - backend handles storage allocation.
STACK-BASED: Now uses IRGenerationContext for scope management instead of parameter threading.
-
Field Summary
Fields inherited from class AbstractGenerator
debugInfoCreator, instructionBuilder, MAX_MESSAGE_LENGTH, stackContext, typeNameOrException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate IR instructions for variable only declaration.Methods inherited from class AbstractVariableDeclGenerator
getDeclInstrsMethods inherited from class AbstractGenerator
addCoverageProbe, createTempVariable, createTempVariableFromContext, extractReturnType, getRecordedSymbolOrException, processBlockStatements, processBlockStatements, truncateMessage, truncateMessage, validateNoPreFlowStatement, validateStatementFormOnly
-
Constructor Details
-
VariableOnlyDeclInstrGenerator
-
-
Method Details
-
apply
Generate IR instructions for variable only declaration. Example: someVar as String? Generates: REFERENCE only (no assignment) STACK-BASED: Gets scope ID from stack context instead of parameter threading.- Specified by:
applyin interfaceFunction<EK9Parser.VariableOnlyDeclarationContext, List<IRInstr>>
-