A standard phase template
The global environment; overridden by instantiation in Global.
The global environment; overridden by instantiation in Global.
The transformer factory
The transformer factory
The name of the phase
The name of the phase
Names of phases that must run before this phase.
Names of phases that must run before this phase.
Name of the phase that this phase must follow immediately.
Name of the phase that this phase must follow immediately.
Is this component enabled? Default is true.
Is this component enabled? Default is true.
SubComponent are added to a HashSet and two phases are the same if they have the same name
SubComponent are added to a HashSet and two phases are the same if they have the same name
True if this phase runs before all other phases.
True if this phase runs before all other phases. Usually, parser
.
True if this phase is not provided by a plug-in.
True if this phase is not provided by a plug-in.
Create a new phase which applies transformer
Create a new phase which applies transformer
The phase corresponding to this subcomponent in the current compiler run
The phase corresponding to this subcomponent in the current compiler run
New flags defined by the phase which are not valid before
New flags defined by the phase which are not valid before
New flags defined by the phase which are not valid until immediately after it
New flags defined by the phase which are not valid until immediately after it
Names of phases required by this component.
Names of phases required by this component. Default is Nil
.
Names of phases that must run after this phase.
Names of phases that must run after this phase. Default is Nil
.
True if this phase runs after all other phases.
True if this phase runs after all other phases. Usually, terminal
.
An InfoTransform contains a compiler phase that transforms trees and symbol infos -- making sure they stay consistent. The symbol info is transformed assuming it is consistent right before this phase. The info transformation is triggered by Symbol::rawInfo, which caches the results in the symbol's type history. This way sym.info (during an enteringPhase(p)) can look up what the symbol's info should look like at the beginning of phase p. (If the transformed info had not been stored yet, rawInfo will compute the info by composing the info-transformers of the most recent phase before p, up to the transformer of the phase right before p.)
Concretely, enteringPhase(p) { sym.info } yields the info *before* phase p has transformed it. Imagine you're a phase and it all makes sense.