| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Better comments and refactorings that move some things around
so that less modules depend on Inliner.
|
|
|
|
|
|
|
|
|
| |
... to tag inlined calls. Perform typings and transformations
of inlined calls in a context that refers to the INlined node
in its InlinedCall property.
The idea is that we can use this to issue better error
positions. This remains to be implemented.
|
|
|
|
|
|
| |
Roll its functionality into Select. Since we can always
tell whether a tree is a type or term there is no expressiveness
gained by having a separate tree node.
|
|
|
|
|
|
|
|
| |
Drop tree node class 'Pair'. It was used only in imports, where
it can easily be replaced by Thicket.
The envisaged use for generic pairs is almost sure better modelled
by a "Pair" class in Dotty's standard library.
|
| |
|
|
|
|
|
|
|
|
| |
There's no point transforming annotations that come from
classfiles. It's inefficient to do so and it's also risky
because it means we'd have to make sense of Scala-2 generated trees.
This should avoid the error in #1222.
|
|
|
|
|
| |
Mode is used from a lot of low-level code, does not just reflect Typer info.
So it makes more sense top to place it in the core package.
|
|
|
|
|
|
|
| |
The field keeps track of the element type. This is necessary
because JavaSeqLiteral is nonvariant and the elements might
be empty, so we cannot always compute the type from the
element types.
|
|
|
|
|
|
|
|
| |
There were two architectural errors here, which confused TreeTransforms and MiniPhases
and which caused "NotDefinedHere" on transformFollowing:
1. TreeTransforms should not have idx fields, MiniPhases have them.2
2. TreeTransformers initialize arrays of MiniPhases not TreeTransforms.
|
|
|
|
|
|
|
| |
Add @sharable annotation for classes and vals that are presumed
to be safely sharable between threads.
Also: Document CtxLazy.
|
|
|
|
|
| |
I scanned the main sources with IntellIJ's spell checker and
corrected what showed up.
|
|
|
|
| |
See comment in the code.
|
| |
|
|
|
|
|
|
|
|
| |
Replace with
<compiler-ops>.throw(exception)
Only leave Throw as an untyped tree.
|
|
|
|
| |
Explanation given in the comment.
|
|
|
|
|
|
| |
Previously, stackoverflows led to infinite loops because the catch
immediately threw another stack overflow. Anyway, one should never
catch Throwable.
|
|
|
|
| |
transformBind.
|
|\
| |
| | |
Change/defaultphase
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
getClass in dotty.
|
| |
| |
| |
| | |
Helps Annotation transformers which do not need to reinitialise themselves anymore.
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Required as gettersAndSetters ignores modifiers
in tree and uses ones in the type instead.
This means that gettersAndSetters carries over
modifiers from type to tree and this one violates postconditions.
|
|
|
|
| |
to be reused by FirstTransform
|
|
|
|
| |
Do not lead to temptation...
|
|
|
|
| |
Should replace destructive inits.
|
|
|
|
| |
Typed MemberDef trees now take the modifiers from their symbol's data.
|
| |
|
|
|
|
|
| |
After Mixin, super calls can appear in statemenr sequences. They need to be
typechecked and transformed using a special context.
|
|
|
|
|
|
| |
Now Try node always has cases as handlers.
In case handler is an Ident of type Throwable => T
than it's desugared to a CaseDef during parsing.
|
| |
|
|
|
|
| |
Include a backtrace of nested calls on error.
|
|
|
|
|
| |
Needed to keep a record of definitions in supercall arguments. These
may not see the enclosing class.
|
|
|
|
|
|
|
|
| |
Super calls need to have special contexts, going beyond super-mode.
It's explained in detail in Context#superCallContext.
this(...) calls also need special contexts, but this is not enabled yet
(some tests fail, need to track down why).
|
|
|
|
| |
Don't want stringly types for this.
|
|
|
|
|
| |
Most transformations are subclasses of phase. Having a generic name
like `name` in scope everywhere is therefore very risky.
|
|
|
|
|
|
| |
Achieved by overridanle method treeTransformPhase in TreeTransform.
This is currently by default the current phase. We should migrate it
to the one after current phase.
|
|
|
|
|
|
|
|
| |
1) Add copiers with default arguments, to avoid boilerplate
2) All copiers are now curried wrt first argument (which is
the original tree).
We already make use of the new features in cpy.DefDef, but not yet elsewhere.
|
|
|
|
|
|
|
|
| |
TreeTransforms are no longer phases. This allows to generate
new transforms in prepare... methods without running into the
problem that thee new transforms are undefined as phases.
It also makes for a cleaner separation of concerns.
|
|
|
|
|
| |
Statements are now transformed with the transform returned by prepareStats,
analogoys to the other prepare methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two improvements to TreeTransform:
1) Added transformOther functionality which handles trees not handled by other parts
2) Passes down Mode.Pattern in the context when in a pattern.
TreeTransform no longer normalizes unknown trees but passes them to transformOther.
The former Companions phase has been renamed to FirstTransform. It now performs the
following optimizations:
- adds companion objects (this was done before)
- other normalizations that were formally done in TreeTransform,
- rewrite native methods to stubs (this was formally done in RefChecks)
|
|
|
|
|
|
|
| |
1) Make local context go to module class if the tree symbol is a package val.
Perviously, this gave the wrong context owner for package definitions.
2) Add a hook to define the phase in which a transform should be run.
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) We now always generate companion objects for classes. This is done in
mini-phase "companions", which also assures that companion-modules appear
after companion-classes.
2) PostTyperTransformers is gone; the part which normalizes trees has been
rolled into TreeTransform and the part which reordered companion classes
and modules is now in Companions.
Note: Some tests were deisabled; should be re-enabled by Dmitry where needed.
|
|
|
|
|
|
|
| |
`owner` for nestedContext in `TreeTransforms` was assigned
using initial period of whole `TreeTransforms` block.
That is incorrect as denotation for this owner could have been
create by some phase in this block.
|
|
|
|
| |
No need to perform zero transformations.
|