Class PrimaryReferenceGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.PrimaryReferenceGenerator
- All Implemented Interfaces:
Function<PrimaryReferenceProcessingDetails,
List<IRInstr>>
final class PrimaryReferenceGenerator
extends AbstractGenerator
implements Function<PrimaryReferenceProcessingDetails,List<IRInstr>>
Generates IR instructions for primary references (THIS and SUPER keywords).
Handles:
- THIS keyword references
- SUPER keyword references
- Memory loading with appropriate variable names
Memory management (RETAIN/SCOPE_REGISTER) is handled by higher-level expression processors. This generator only creates the LOAD instruction for the reference.
MIGRATING TO STACK: Now extends AbstractGenerator to access stack context for debug info creation. Still maintains Function interface for incremental migration approach.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
ConstructorsConstructorDescriptionPrimaryReferenceGenerator
(IRGenerationContext stackContext) Constructor accepting IRGenerationContext for stack-based debug info access. -
Method Summary
Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
PrimaryReferenceGenerator
PrimaryReferenceGenerator(IRGenerationContext stackContext) Constructor accepting IRGenerationContext for stack-based debug info access.
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceFunction<PrimaryReferenceProcessingDetails,
List<IRInstr>>
-