| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Expand SAM closures to anonymous classes if needed
|
| |
| |
| |
| |
| |
| |
| | |
Also included are
- Closures implementing classes that inherit from a class other than Object
- Closures that implement traits which run initialization code.
|
| |
| |
| |
| |
| |
| |
| |
| | |
superClass was a duplicate; we already have one in SymDenotation,
so we delete the one in SymUtils.
superInterfaces is too easy to confused with the JVM notion, which
is different. I replaced with directlyInheritedTraits.
|
| |
| |
| |
| | |
Thanks for pointing it out, @smarter.
|
| |
| |
| |
| |
| |
| |
| | |
Now takes a list of parent types. We needed only one parent for SAM implementation
but it makes sense to generalize this.
Also, removed redundant code accidentally left in.
|
| |
| |
| |
| | |
Removed the workaround of the original crasher which was addressed in the last commit.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Like all other variables, pattern-bound vars need a fully defined type. I was
thinking originally that demanding a fully defined selector type is sufficient
to ensure this, but that's not true: An outer pattern might call a polymorphic
unapply and its type variables need not be fully instantiated.
With the fix, the minimized test case from ExpandSAMs works.
|
| |
| |
| |
| | |
The phase replaces SAM closures with anonymous classes when necessary.
|
| |
| |
| |
| | |
See comment in the code.
|
| |
| |
| |
| | |
As the name implies, this creates an anonymous class.
|
| |
| |
| |
| |
| |
| |
| | |
The handling of the first parent of ClassDef was broken if
that parent had type parameters. This was exposed by following
commites which use ClassDef more intensively than before in
creating anonymous classes representing closures.
|
| |
| |
| |
| |
| |
| | |
It's common that one wants to create class symbols with arbitary parent types,
not just TypeRefs. But for the casual user it's non-obvious how to do it.
Hence the new creation method.
|
| | |
|
|\ \
| | |
| | | |
Fix #511. Lambdas of traits that inherit abstract member.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
https://github.com/DarkDimius/scala/commit/9c054bd687bbbcaa75f3f10a1d343998c6c1a2ba
As bug is minor I do not want to update scalac fork dependency just yet.
|
|\ \ \
| | | |
| | | | |
Fix of #503
|
| | | |
| | | |
| | | |
| | | | |
A search revealed duplicates, which are eliminated now.
|
| | | |
| | | |
| | | |
| | | | |
Previously, we considered only methods. #503 shows that this is wrong.
|
|\ \ \ \
| | | | |
| | | | | |
Fix compatibility of Java with value classes
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This avoids getting a runtime error when calling a Java-defined method
whose signature contains value classes. It happened because we erased
the value classes in this signature even though it comes from a
classfile.
Amusingly, this problem also exists in scalac:
<https://issues.scala-lang.org/browse/SI-9298>
|
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
DottyPredef needs to be compiled with -Yno-imports because it would
clash otherwise with the DottyPredef in the root context.
Note that ??? has to be written in fully qualified form because of #530.
|
|/ / /
| | |
| | |
| | | |
If the flag is set, no root imports are added.
|
|\ \ \
| | | |
| | | | |
Expand private members if necessary
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
It is now redundant.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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).
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Logic moved from RefChecks to Mixin; implementation
is now by name expansion instead of setting NotJavaPrivate
flag.
|
| | | |
| | | |
| | | |
| | | | |
Resets private flag, and expands the name if necessary.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Verified that all tests still run. This is a first step, so that
we can later on eliminate NotJavaPrivate altogether.
|
|\ \ \ \
| | | | |
| | | | | |
Pickling modularization reorg
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
The pickling package got rather large and confusing with three
separate tasks that each had their own conventions: read JVM classfiles,
read Scala2 pickle info, read Tasty. The classes for each task are now in
separate packages.
|
|\ \ \ \
| | | | |
| | | | | |
Fix #522.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were missing a substitution in full parameterization. Embarraingly, this
made even the example in the doc comment of `fullyParameterizedDef` fail.
|
|/ / / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Lower bounds need to be instantiated just like upper bounds.
F-bounded polymorphism (which only applies too upper bounds)
is one reason for instantiating arguments, but parameters
referring to other parameters is another one. An the latter
applies to lower bounds as well.
|
|\ \ \
| | | |
| | | | |
Compile from Tasty
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We want to ensure that the whole tree is read at phase
frontend. To achieve this, we run an empty traverser over the tree.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These only exist if there was a pickler, and they are not unique
per CompilationUnit.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A missing delta position signifies that the node has
the same position as its parent. Once that case was
added, we can now enable positions when reading from Tasty.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
So far: Only one source file is recorded. Should evaluate
whether more are needed. Will programs composed from several
source files be pickled? They will certainly be generated after
inlining, but maybe all that happens after pickling?
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously, the empty package was always initialized with the empty scope.
This means that separate compilation between files in the empty package
was not possible.
|