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 14) because programs and classes may reference constants. With ASM's COMPUTE_FRAMES, referenced classes must exist on disk.
-
Field Summary
Fields inherited from class CompilerPhase
compilableProgramAccess, listener, reporter -
Constructor Summary
ConstructorsConstructorDescriptionCodeGenerationConstants(SharedThreadContext<CompilableProgram> compilableProgramAccess, FileHandling fileHandling, 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
-