Class CodeGenerationConstants
java.lang.Object
org.ek9lang.compiler.CompilerPhase
org.ek9lang.compiler.phase10.CodeGenerationConstants
- All Implemented Interfaces:
BiFunction<Workspace, CompilerFlags, CompilationPhaseResult>
MULTI THREADED
Generate all constants that have been defined.
Aggregates all constant IRConstructs per module into a single _Constants JVM class.
Each module's constants become static fields on the generated class, initialized in <clinit>.
This phase runs BEFORE CodeGenerationAggregates (Phase 18) because programs and classes may reference constants. (The ordering is about symbol availability, NOT files on disk: Ek9ClassWriter resolves common superclasses from ISymbol-derived data, and the CLI batch path writes no class files at all - it holds them and builds the jar from memory.)
-
Field Summary
Fields inherited from class CompilerPhase
compilableProgramAccess, listener, modelFrozen, reporter -
Constructor Summary
ConstructorsConstructorDescriptionCodeGenerationConstants(SharedThreadContext<CompilableProgram> compilableProgramAccess, FileHandling fileHandling, ConstructOutputSink outputSink, Consumer<CompilationEvent> listener, CompilerReporter reporter) -
Method Summary
Modifier and TypeMethodDescriptionbooleandoApply(Workspace workspace, CompilerFlags compilerFlags) Do the compilation phase.Methods inherited from class CompilerPhase
apply, getParsedModuleForSourceMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
Method Details
-
doApply
Description copied from class:CompilerPhaseDo the compilation phase.- Specified by:
doApplyin classCompilerPhase
-