| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
1) Have symbol sets cached per run
2) Use methods Denotation#isPrimitiveValueClass, Denotation#isNumericValueClass
instead of calling contains directly on symbol sets.
|
|
|
|
|
|
|
| |
Maps should not have TypeRefs as keys, yet symbols are not stable
for recompilation. Solution: Construct these maps over symbols but
move them to CapturedVars#Transform where they will be re-built
on each run.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Symbols are not stable between runs, so if some symbol referred
to from Definitions gets recompiled, there are then two Symbols
that are both visible, one referenced from Definitions, the other
the one that got compiled.
Thos led to a crash when e.g. compiling scala.Short, because the
newly compiled symbol was not recognized as a primitive value
class.
The present commit tries to make systematic changes without regard
to simplicity or aesthetics. This will be polished in future commits.
// ### comments signal areas that need further attention.
|
|
|
|
|
|
| |
CapturedVars introduced an assignment that could cause a try to be
executed with a non-empty stack, even after LiftTry had already run.
We now avoid this by introducing a temporary variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lazy trees can live longer than runs, so it is important
that they capture as little as possible. In particular they
should not capture contexts.
This change led with a ripple through effect to many changes
where operations now have to parameterzied with contexts, in
particular in what concerns tree folding.
The changes in turn uncovered some areas where dotc was
incompatible with scalac, and flagged correct things as errors.
These will be fixed in the next commits.
Another small twist: EmptyTrees will not be read in delayed mode,
so that one can check for lacking definitions without deserializing
the rhs.
|
|
|
|
| |
As noted by @sjrd.
|
|
|
|
|
| |
Now the default phase of treeTransformPhase is phase.next, we
can remove all overrides that specify the same phase.
|
|
|
|
| |
No global side effect on capturedVars anymore.
|
|
|
|
|
|
|
|
| |
Required some refactoring. Instead of transformSym we now
transform ValDefs as we prepare for them. The previous scheme
could not control directly whetrher transformSym or collectCaptured would
run first. Turns out that init ran before collectCaptured but
prepareForUnit did not, leading to test failures in pos/capturedvars.
|
|
|
|
| |
Needed to fix a problem in CapturedVars to make this work.
|
|
|
|
| |
Advantage: Can rename typed as well as untyped trees.
|
|
|
|
|
| |
The idea to traverse with currently enclosing methid is also used in
LambdaLift and could be used elsewhere.
|
|
Breaks out boxing functionality of captured vars from lambda lift.
|