A tree printer which is stingier about vertical whitespace and unnecessary punctuation than the standard one.
One unit of compilation that has been submitted to the compiler.
Collects for certain classes of warnings during this run.
Aux datastructure for solving the constraint system The depency graph container with helper methods for node and edge creation
Documented definition, eliminated by analyzer
Derived value class injection (equivalent to: new C(arg)
after erasure); only used during erasure.
Only used during parsing
A Run is a single execution of the compiler on a sets of units
This must guarantee not to force any evaluation, so we can learn a little bit about trees in the midst of compilation without altering the natural course of events.
Array selection <qualifier> . <name>
only used during erasure
Generate ASTs
Generate ASTs
emitted by typer, eliminated by refchecks
Construct class definition with given class symbol, value parameters, supercall arguments and template body.
Construct class definition with given class symbol, value parameters, supercall arguments and template body.
the class symbol
the modifiers for the class constructor, i.e. as in class C private (...)
the value parameters -- if they have symbols they
should be owned by sym
the supercall arguments
the template statements without primary constructor and value parameter fields.
An object representing a missing compilation unit.
Generates a template with constructor corresponding to
Generates a template with constructor corresponding to
constrmods (vparams1_) ... (vparams_n) preSuper { presupers } extends superclass(args_1) ... (args_n) with mixins { self => body }
This gets translated to
extends superclass with mixins { self => presupers' // presupers without rhs vparamss // abstract fields corresponding to value parameters def <init>(vparamss) { presupers super.<init>(args) } body }
Returns List of (phase, value) pairs, including only those where the value compares unequal to the previous phase's value.
Returns List of (phase, value) pairs, including only those where the value compares unequal to the previous phase's value.
ICode analysis for optimization
Returns List of ChangeAfterPhase objects, encapsulating those phase transitions where the result of the operation gave a different list than it had when run during the previous phase.
Returns List of ChangeAfterPhase objects, encapsulating those phase transitions where the result of the operation gave a different list than it had when run during the previous phase.
Add the internal compiler phases to the phases set.
Add the internal compiler phases to the phases set. This implementation creates a description map at the same time.
Extract all phases supplied by plugins and add them to the phasesSet.
Extract all phases supplied by plugins and add them to the phasesSet.
phasesSet
Fold constants
The raw doc comment of symbol sym
, minus usecase and define sections, augmented by
missing sections of an inherited doc comment.
The raw doc comment of symbol sym
, minus usecase and define sections, augmented by
missing sections of an inherited doc comment.
If a symbol does not have a doc comment but some overridden version of it does,
the doc comment of the overridden version is copied instead.
Copy propagation for optimization
The currently active run
The currently active run
The id of the currently active run
The id of the currently active run
Invalidate contents of setting -Yinvalidate
Invalidate contents of setting -Yinvalidate
Associate comment with symbol sym
at position pos
.
Associate comment with symbol sym
at position pos
.
The position of the raw doc comment of symbol sym
, or NoPosition if missing
If a symbol does not have a doc comment but some overridden version of it does,
the position of the doc comment of the overridden version is returned instead.
The position of the raw doc comment of symbol sym
, or NoPosition if missing
If a symbol does not have a doc comment but some overridden version of it does,
the position of the doc comment of the overridden version is returned instead.
The raw doc comment map
The raw doc comment map
Expand inheritdoc tags
Expand inheritdoc tags
This is done separately, for two reasons: 1. It takes longer to run compared to merge 2. The inheritdoc annotation should not be used very often, as building the comment from pieces severely impacts performance
The source (or parent) comment
The child (overriding member or usecase) comment
The child symbol
The child comment with the inheritdoc sections expanded
Expand variable occurrences in string str
, until a fix point is reached or
a expandLimit is exceeded.
Expand variable occurrences in string str
, until a fix point is reached or
a expandLimit is exceeded.
The symbol for which doc comments are generated
The class for which doc comments are generated
Expanded string
Returns just the wiki expansion (this would correspond to a comment in the input format of the JavaDoc tool, modulo differences in tags.
Returns just the wiki expansion (this would correspond to a comment in the input format of the JavaDoc tool, modulo differences in tags.)
The cooked doc comment of symbol sym
after variable expansion, or "" if missing.
The cooked doc comment of symbol sym
after variable expansion, or "" if missing.
The symbol for which doc comment is returned (site is always the containing class)
The cooked doc comment of symbol sym
after variable expansion, or "" if missing.
The cooked doc comment of symbol sym
after variable expansion, or "" if missing.
The symbol for which doc comment is returned
The class for which doc comments are generated
when more than 10 successive expansions of the same string are done, which is interpreted as a recursive variable definition.
Tree generation, usually based on existing symbols.
Returns the file with the given suffix for the given class.
Returns the file with the given suffix for the given class. Used for icode writing.
Icode verification
ICode generator
Invalidates packages that contain classes defined in a classpath entry, and rescans that entry.
Invalidates packages that contain classes defined in a classpath entry, and rescans that entry.
A pair consisting of
Let's share a lot more about why we crash all over the place.
Let's share a lot more about why we crash all over the place. People will be very grateful.
There are common error conditions where when the exception hits here, currentRun.
There are common error conditions where when the exception hits here, currentRun.currentUnit is null. This robs us of the knowledge of what file was being compiled when it broke. Since I really really want to know, this hack.
Load all available plugins.
Load all available plugins. Skips plugins that either have the same name as another one, or which define a phase name that another one does.
Load a rough list of the plugins.
Load a rough list of the plugins. For speed, it does not instantiate a compiler run. Therefore it cannot test for same-named phases or other problems that are filtered from the final list of plugins.
Lookup definition of variable.
Lookup definition of variable.
The variable for which a definition is searched
The class for which doc comments are generated
Merge elements of doccomment src
into doc comment dst
for symbol sym
.
Merge elements of doccomment src
into doc comment dst
for symbol sym
.
In detail:
copyFirstPara
is true, copy first paragraph
2. For all parameters of sym
if there is no @param section
in dst
for that parameter name, but there is one on src
, copy that section.
3. If there is no @return section in dst
but there is one in src
, copy it.
Returns the mirror that loaded given symbol
Returns the mirror that loaded given symbol
Print tree in detailed form
Computing pairs of overriding/overridden symbols
A description of the phases that will run
A description of the phases that will run
Summary of the per-phase values of nextFlags and newFlags, shown with -Xshow-phases if -Ydebug also given.
Summary of the per-phase values of nextFlags and newFlags, shown with -Xshow-phases if -Ydebug also given.
The names of the phases.
The names of the phases.
A description of all the plugins that are loaded
A description of all the plugins that are loaded
Summary of the options for all loaded plugins
Summary of the options for all loaded plugins
Switch to turn on detailed type logs
Switch to turn on detailed type logs
The raw doc comment of symbol sym
, as it appears in the source text, "" if missing.
The raw doc comment of symbol sym
, as it appears in the source text, "" if missing.
Register new context; called for every created context
Register new context; called for every created context
Register top level class (called on entering the class)
Register top level class (called on entering the class)
resets symbol and tpe fields in a tree, @see ResetAttrs
resets symbol and tpe fields in a tree, @see ResetAttrs
Scala primitives, used in genicode
We resolve the class/object ambiguity by passing a type/term name.
We resolve the class/object ambiguity by passing a type/term name.
Called every time an AST node is successfully typechecked in typerPhase.
Called every time an AST node is successfully typechecked in typerPhase.
Called from parser, which signals hereby that a method definition has been parsed.
Called from parser, which signals hereby that a method definition has been parsed.
Some statistics (normally disabled) set with -Ystatistics
The cooked doc comment of an overridden symbol
The cooked doc comment of an overridden symbol
Don't want to introduce new errors trying to report errors, so swallow exceptions.
Don't want to introduce new errors trying to report errors, so swallow exceptions.
Returns the javadoc format of doc comment string s
, including wiki expansion
Returns the javadoc format of doc comment string s
, including wiki expansion
Representing ASTs as graphs
Trees fresh from the oven, mostly for use by the parser.
Tree checker
The list of use cases of doc comment of symbol sym
seen as a member of class
site
.
The list of use cases of doc comment of symbol sym
seen as a member of class
site
. Each use case consists of a synthetic symbol (which is entered nowhere else),
of an expanded doc comment string, and of its position.
The symbol for which use cases are returned
The class for which doc comments are generated
when more than 10 successive expansions of the same string are done, which is interpreted as a recursive variable definition.
(builderGlobal: StringAdd).self
(builderGlobal: StringFormat).self
(Since version 2.10.0) Give us a reason
A hook that lets subclasses of Global
define whether a package or class should be kept loaded for the
next compiler run.
A hook that lets subclasses of Global
define whether a package or class should be kept loaded for the
next compiler run. If the parameter sym
is a class or object, and clearOnNextRun(sym)
returns true
,
then the symbol is unloaded and reset to its state before the last compiler run. If the parameter sym
is
a package, and clearOnNextRun(sym) returns
true, the package is recursively searched for
classes to drop.
Example: Let's say I want a compiler that drops all classes corresponding to the current project
between runs. Then keepForNextRun
of a toplevel class or object should return true
if the
class or object does not form part of the current project, false
otherwise. For a package,
clearOnNextRun should return true
if no class in that package forms part of the current project,
false
otherwise.
A class symbol, object symbol, package, or package class.
(Since version 2.10.0) use invalidateClassPathEntries instead
(Since version 2.10.0) Moved to tree.duplicate
(Since version 2.10.0) The compiler doesn't use this so you shouldn't either - it will be removed
(Since version 2.10.1) Renamed to reportThrowable
(Since version 2.9.0) Use forInteractive or forScaladoc, depending on what you're after
(Since version 2.10.0) use genPolyType(...) instead
(Since version 2.9.0)
(builderGlobal: ArrowAssoc[BuilderGlobal]).x
(Since version 2.10.0) Use leftOfArrow
instead
(builderGlobal: Ensuring[BuilderGlobal]).x
(Since version 2.10.0) Use resultOfEnsuring
instead