Package org.ek9lang.compiler
Class CompilerPhase
java.lang.Object
org.ek9lang.compiler.CompilerPhase
- All Implemented Interfaces:
BiFunction<Workspace,
CompilerFlags, CompilationPhaseResult>
- Direct Known Subclasses:
CodeGenerationAggregates
,CodeGenerationConstants
,CodeGenerationFunctions
,CodeGenerationPreparation
,CodeOptimisation
,IRAnalysis
,IRGeneration
,IROptimisation
,ModuleDuplicateSymbolChecks
,NonInferredTypeDefinition
,Packaging
,PackagingPostProcessing
,PluginLinkage
,PluginResolution
,PostSymbolResolutionChecks
,PreIntermediateRepresentationChecks
,ProgramWithIR
,ReferenceChecks
,SymbolDefinition
,SymbolResolution
,TemplateGeneration
,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
Modifier and TypeFieldDescriptionprotected final SharedThreadContext
<CompilableProgram> protected final Consumer
<CompilationEvent> protected final CompilerReporter
-
Constructor Summary
ModifierConstructorDescriptionprotected
CompilerPhase
(CompilationPhase phase, SharedThreadContext<CompilableProgram> compilableProgramAccess, Consumer<CompilationEvent> listener, CompilerReporter reporter) -
Method Summary
Modifier and TypeMethodDescriptionapply
(Workspace workspace, CompilerFlags compilerFlags) protected abstract boolean
doApply
(Workspace workspace, CompilerFlags compilerFlags) Do the compilation phase.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
listener
-
reporter
-
compilableProgramAccess
-
-
Constructor Details
-
Method Details
-
doApply
Do the compilation phase. -
apply
- Specified by:
apply
in interfaceBiFunction<Workspace,
CompilerFlags, CompilationPhaseResult>
-