Class SymbolDefinition

java.lang.Object
org.ek9lang.compiler.CompilerPhase
org.ek9lang.compiler.phase1.SymbolDefinition
All Implemented Interfaces:
BiFunction<Workspace, CompilerFlags, CompilationPhaseResult>

public final class SymbolDefinition extends CompilerPhase
SINGLE THREADED. It was multi-threaded, and the parallel machinery was deliberately removed: every definition goes through the CompilableProgram's exclusive lock, so more threads made it slower rather than faster. This phase is ~18% of a 1M compile and parallelising it needs the lock contention solved first, not more threads. Goes through the now successfully parse source files and uses a listener to do the first real pass at building the IR - simple Symbol definitions. This means identifying types and other symbols. Note that most of the real processing is done in the DefinitionListener. This is just the wrapper entry point that is public, so it can be plugged into the FrontEndSupplier.