Class SyntheticMethodGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.SyntheticMethodGenerator
Generates IR for synthetic methods (default operators).
This generator creates IR for all 11 default operators that EK9 supports using a map-based dispatch pattern. It leverages existing markers from earlier phases (isSynthetic() and DEFAULTED squirrel data) to identify which operators need synthesis.
Uses the stack-based IRGenerationContext to eliminate parameter threading and provide consistent scope/debug/memory management.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
ConstructorsConstructorDescriptionSyntheticMethodGenerator
(IRGenerationContext stackContext) Create the synthetic method generator using stack context. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generateFor
(ISymbol symbol) Generate IR for all synthetic methods in the given symbol.Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
SyntheticMethodGenerator
SyntheticMethodGenerator(IRGenerationContext stackContext) Create the synthetic method generator using stack context.
-
-
Method Details
-
generateFor
Generate IR for all synthetic methods in the given symbol.
-