| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Now that caes classes always inherit from ProductX, we can avoid
the special case. (We need to define _1 anyway to implement Product1).
|
|
|
|
| |
If a TypeRef with an expanded name is an alias type, print the alias instead.
|
|
|
|
|
| |
New phase for Synthetic Method generation. Scala 2.x did it in Typer, but
it's cleaner to do it in a separate phase.
|
|
|
|
| |
RefChecks needs both methods.
|
|
|
|
|
| |
Also renamed Boolean_and/or to _&&/||, to make it conform
to naming convention for other Definition operators.
|
|
|
|
|
|
| |
asInstance/isInstance/ensureConforms/and/or.
They replace some former "mk..." methods.
|
|
|
|
| |
Was missing before.
|
|
|
|
|
|
| |
After erasure, former Any members become Object members.
Also, fixed some typos and added some TODOs on addBridges.
|
|
|
|
|
|
|
|
| |
Case classes with arity <= 1 now also get a ProductN parent trait.
This is necessary because we inherit productArity and Element methods
in case classes from the ProdictN trait.
Needed to add Product0 for this, which is not defined in Scala2.x.
|
|
|
|
|
|
|
|
| |
Eta-lifting picked some arbitrary base type. It turned out that i94-nada failed once we add
a product trait to case classes (in the next commit) because Eta-Kifting picked Product
as the base type, even though the target type was bounded by Monad. We now change the scheme
so that the target type is included in the lifting, in order to avoid that we lift to
useless types.
|
|
|
|
|
|
| |
Scopes are also used in overriding pairs, and there multiple types with
the same name can be entered in a scope. So the assert to the contrary
should be limited to typechecking only.
|
|
|
|
| |
Used to show "mutable var x: T".
|
|
|
|
|
|
|
|
|
|
|
|
| |
Should have lazy flag set, otherwise forward reference checking would
fail for modules.
Note: LazyVals needed to be disabled because it also should transform
module vals, but didn't do this so far because it only tested the Lazy flag.
It turned out the module val transformation exposed some bugs in lazy vals
in that LazyVals creates symbols as a side effect and enters them into scopes.
Such mutations are allowed onyl in very specific cases (essentially only for local
throw-away scopes).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Would be flagged as unimplemented members in refChecks otherwise
|
| |
|
|
|
|
|
| |
... so that it can be combined with TreeTransform in a trait composition
in a future dientanglement of TreeTransforms and Phases.
|
|
|
|
|
|
|
|
| |
This is still disabled, because the prepare machinery in transform
does not work yet. Concretely, prepare ops need to return a new TreeTransform
but that tree transform has an undefined phaase id.
We need some architectural changes to disentangle transforms from phases.
|
|
|
|
|
| |
Statements are now transformed with the transform returned by prepareStats,
analogoys to the other prepare methods.
|
|
|
|
|
|
|
|
| |
Now that F-bunded types are treated more robustly, we can check bounds for
non-emptyness during Typer.
This unvealed one wrong test (wonder how that passed scalac?), which got
moved to neg.
|
|
|
|
|
| |
Insert LazyRefs to break cycles for F-bounded types that
are unpickled or read from Java signatures.
|
|
|
|
|
|
|
|
|
|
| |
Cycles are now detected early, when an info is first completed.
Legal, f-bounded cycles are broken by a LazyRef, which will construct
its type lazily. This makes checkBounds validation of AppliedTypeTrees work
(in FirstTransform). Formerly, this stackoverflowed despite the laziness
precautions in findMember.
Todo: Do the same for class files coming from Java and Scala 2.x.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
Added method to traverse all parts of a type.
|
|
|
|
|
|
| |
Added decorators for symbols that can query specific
annotations and annotation arguments (for now, -deprecated
and -migration are added)
|
| |
|
|
|
|
| |
These were not handled before.
|
|\
| |
| | |
Added elimLocals miniphase
|
|/
|
|
|
|
|
| |
This phase drops the Local flag from all private[this] and protected[this] members.
This allows subsequent code motions where code is moved from a class to its
companion object. It invalidates variance checking, which is consequently disabled
when retyping.
|
|\
| |
| | |
transform/variance
|
| |
| |
| |
| | |
Disabled for now, awaiting a fix.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Variance checking is now run as part of type-checking.
Fixed tests that exhibited variance errors. Added tests where some classes of
variance errors should be detected.
|
| |
| |
| |
| |
| |
| | |
1) Type parameter accessors inherit their variance from the type parameter
2) Copy method parameter defaults are annotated @uncheckedVariance. This is
necessary because default methods will be checked for variance.
|
| |
| |
| |
| |
| | |
It was unmaintained and superseded by TreeChecker. The only needed bit,
escapingRefs, got moved to Typer.
|
| |
| |
| |
| | |
Not yet integrated or tested.
|
| | |
|
| | |
|
|/
|
|
|
| |
Added OverridingPairs
Small tweaks here and there.
|
|\
| |
| | |
Enable improved incremental compilation (name hashing)
|
| |
| |
| |
| |
| | |
The algorithm is stable enough to try it out for dotty build. It's
enabled in sbt and Akka already.
|
|\ \
| |/
|/| |
Transform/repeated
|
| |
| |
| |
| |
| |
| | |
Currently we cannot run this test automatically because the testing framework
does not know about .java files. It was run manually and verified that ElimRepeated
does was it is supposed to do (create a varargs bridge).
|
| |
| |
| |
| |
| |
| | |
Now inserts a bridge whenever a method overrides a Java varargs method.
This is conservative but safe. We might use a more aggressive scheme, as
the one in Scala 2, but it's not clear the win would warrant it.
|
| |
| |
| |
| | |
... and moved to TypeApplications.
|
| |
| |
| |
| |
| | |
Did not work for this prefixes and other singleon types before.
I.d. was generating a SelectFromType tree, which is wrong.
|
| |
| |
| |
| |
| | |
Distinguish translations between Java and Scala varargs methods
and add bridges where needed.
|
| |
| |
| |
| | |
so that sig(<repeated>[T]) = sig(Seq[T]).
|
|/
|
|
|
|
|
| |
Having two repeated param classes (and two types) does not work,
because we need to maintain an overriding relationship between
Scala repeated param methods and Java repeated param methods (this
will be resolved later by bridges).
|
|\
| |
| | |
Tailrec tc
|