Class CompilerPhase
java.lang.Object
org.ek9lang.compiler.CompilerPhase
- All Implemented Interfaces:
BiFunction<Workspace, CompilerFlags, CompilationPhaseResult>
- Direct Known Subclasses:
CodeGenerationAggregates, CodeGenerationConstants, CodeGenerationPreparation, CodeOptimisation, IRAnalysis, IRGenerator, IROptimisation, ModuleDuplicateSymbolChecks, NonInferredTypeDefinition, Packaging, PackagingPostProcessing, PluginLinkage, PluginResolution, PostSymbolResolutionChecks, PreIntermediateRepresentationChecks, ReferenceChecks, SymbolDefinition, SymbolResolution, TypeHierarchyChecks
public abstract class CompilerPhase
extends Object
implements BiFunction<Workspace, CompilerFlags, CompilationPhaseResult>
Marks the specific activity of a compiler phase.
Provides mechanism to pass both phase and the compiler flags into the compilable program.
This then enables them to be accessed within other components during compilation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SharedThreadContext<CompilableProgram> protected final Consumer<CompilationEvent> protected final CompilerReporter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompilerPhase(CompilationPhase phase, SharedThreadContext<CompilableProgram> compilableProgramAccess, Consumer<CompilationEvent> listener, CompilerReporter reporter) -
Method Summary
Modifier and TypeMethodDescriptionapply(Workspace workspace, CompilerFlags compilerFlags) protected abstract booleandoApply(Workspace workspace, CompilerFlags compilerFlags) Do the compilation phase.protected ParsedModuleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Field Details
-
listener
-
reporter
-
compilableProgramAccess
-
-
Constructor Details
-
Method Details
-
doApply
Do the compilation phase. -
apply
- Specified by:
applyin interfaceBiFunction<Workspace, CompilerFlags, CompilationPhaseResult>
-
getParsedModuleForSource
-