| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ |
|
|\
| |
| | |
Implement Scala2 traits
|
| |
| |
| |
| |
| |
| | |
Instead of cleaning up, generate sensical code in the first place. This is shorter and
(I would argue) clearer, and also has the advantage that some initializing assignments
are not generated at all.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes junit failure in dotty where a lazy val was initialized with
a "...$lazy = _" assignment.
Moved ElimWiildcard to one group before. It does not really matter where it goes
so it might as well go someshere in the middle of the pack.
|
| |
| |
| |
| | |
This phase rewrites supercalls to calls to static implementation class methods.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3d240ad40ccfb570174ec9758bfe68ba4e91eefb.
This commit got in without succeding the review.
It broke what already was working(inner static objects),
and made impossible moving static methods from companion object to companion class.
Additionally, commenting or removing assertions is not the way to go, and should not pass review.
See discussion here: https://github.com/dotty-staging/dotty/commit/3d240ad40ccfb570174ec9758bfe68ba4e91eefb
|
|
|
|
|
|
|
|
|
| |
- Only transform static methods which are inside module classes.
- Make sure that the prefix of the underlying type of the Ident
is a ThisType of the current module class. For example in
"scala.Int.box(42)", "box" is an Ident whose underlying type is
"TermRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,scala)),Int$)),box)",
but we should not trigger an assertion in this case.
|
| |
|
|
|
|
| |
To have less interactions with erasure.
|
| |
|
|
|
|
|
| |
Can now compile Predef/DottyPredef without -Yno-import option.
Achieved by making some parts of imports more lazy.
|
|\
| |
| | |
Expand SAM closures to anonymous classes if needed
|
| |
| |
| |
| | |
The phase replaces SAM closures with anonymous classes when necessary.
|
| |
| |
| |
| | |
If the flag is set, no root imports are added.
|
|\ \
| |/
|/| |
Expand private members if necessary
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A late miniphase which resets private flag of all
members that are not accessed from within same class.
Replaces logic in RefChecks. Doing this late has two
advantages
- we can use name expansion, because references are
symbolic, so the names of symbols and references
to them do not need to correspond anymore.
- we can automatically correct for symbols moved in earlier
phases (e.g. lifted out by LambdaLift).
|
|\ \
| | |
| | | |
Compile from Tasty
|
| | |
| | |
| | |
| | | |
`FromTasty` is a main module which compiles TASTY info instead of sources.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This corresponds roughly to step 2 of SIP-15 and to the peephole
optimizations of step 3.
The extractors in TreeExtractors are copied or inspired from
src/compiler/scala/tools/nsc/ast/TreeInfo.scala in scalac.
|
| |/
|/|
| |
| |
| | |
This phase erases ErasedValueType to their underlying type, in scalac
this was done in PostErasure.
|
| | |
|
|/ |
|
|\
| |
| | |
Refactor/super accessors
|
| |
| |
| |
| | |
This means we now also pickle Imports and NamedArgs.
|
| | |
|
| |
| |
| |
| |
| | |
Move InstChecks functionality into PostTyper in order
to save a separate traversal.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New phase: PostTransform, runs after Typer.
SuperAccessors and ParamForwarders (renamed from ForwardParamAccessors) are
helper objects of post transform.
Next: Add instChecks as well.
|
|\ \
| |/
|/| |
New phase: FunctionalInterfaces. Rewires closures to implement more specific types of Function SAMs.
|
| |
| |
| |
| | |
Rewires closures to implement more specific types of Function SAMs.
|
|/
|
|
|
|
| |
- Abstract classes cannot be instantiated (exceptions:
parent news and Java annotations)
- Instantiateed class must conform to its self type.
|
| |
|
| |
|
|
|
|
|
| |
Renames constructors in traits so that backend will call them with invokeInterface, instead of invokeSpecial
Also makes sure that renamed constructor bodies conforms to type of method
|
|
|
|
|
|
|
|
|
|
| |
ElimLocals becomes a slightly less trivial transform: NormalizeFlags.
It also computes PureInterface flag, thus relieving Namer and Unpickler
from doing the same in two different ways. Besides, the computation in
Namer/TreeInfo was flawed because it did not take into account that
nested non-static classes are not allowed in an interface (only static
classes are, but these would not be members of the interface in the Scala
sense).
|
| |
|
|
|
|
|
| |
Ident('_') was reaching backend in rhs of body of initialiser methods.
This phase replaces those initialisers with default values of corresponding type.
|
|
|
|
|
| |
Previously it was incorrectly done after the run was initialized, this
fixes #391.
|
|
|
|
|
|
| |
ElimByName might be merged with erasure, so we can alreayd move it
as close a pssoble to it. Verified that it can't be moved beyong ResolevSuper,
but not why.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, tests fail. The failures I checked are all related to tailcalls.
Not sure whether there are others.
This is a blocker for serialization. Orphan parameters cannot be serialized.
Maybe rethink the position of tailcalls? It looks to me that the repeated trouble it gives us is
more than the effort required to put an efficient tailcall recognition after pattern matching in place.
But I might be wrong.
|
|
|
|
| |
Now the scheme doesn't introduce circular dependencies between container vals.
|
|
|
|
|
|
|
| |
Two named types with same names and NoPrefix prefixes are not necessarily equal!
The fix uncovered an error in tailrec. When run on Decorators.scala, tailrec in its old
position at the end of a group produces not -Ycheckable code. Problem was fixed
by moving TailRec into its own group.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Replaces SeqLiterals by JavaSeqLiterals, because the latter's
(array-)type is preserved after erasure.
|
| |
|
| |
|
| |
|