| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Merge 2.10.x
|
|/| |
|
| |\
| | |
| | | |
Fix bug with super-accessors / dependent types
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Super-accessors are generated as `DefDef`'s with `EmptyTree` as a
placeholder for the RHS. This is filled in later in `Mixin` in
`completeSuperAccessor`.
A change in `Uncurry` (SI-6443 / 493197f), however, converted this
to a `{ EmptyTree }`, which evaded the pattern match in mixin.
This commit adds a special case to the dependent method treatment
in Uncurry to avoid generating redundant blocks.
|
|\ \ \
| | | |
| | | | |
Merge 2.10.x
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Here's the merge plan I used:
```
$ g co 2.10.x && g pull scala 2.10.x && g co master && g pull scala master
$ export MB=`git merge-base 2.10.x master` # 9cdbe28c00b39c51ae9afe3066c8b44a6e5f6f96
$ git log --graph --oneline $MB...2.10.x
* b3ad7534fb (scala/2.10.x, 2.10.x) Merge pull request #3364 from retronym/ticket/8152
|\
| * 9df2dcc584 (scala/pr/3364) [nomaster] SI-8152 Backport variance validator performance fix
* | d5801b9eee Merge pull request #3328 from retronym/ticket/8111
|\ \
| |/
|/|
| * c91d373a78 (scala/pr/3328) SI-8111 Expand the comment with a more detailed TODO
| * 2c770ae31a (scala/pr/3327) SI-8111 Repair symbol owners after abandoned named-/default-args
* | a8122413c0 Merge pull request #3345 from retronym/ticket/8114
|\ \
| * | 5876e8c621 (scala/pr/3345) [nomaster] SI-8114 Binary compat. workaround for erasure bug SI-7120
* | | aefe3fb844 Merge pull request #3344 from jamesward/fix/ec-implicit-error
|\ \ \
| |/ /
|/| |
| * | bd4adf5c97 (scala/pr/3344) More clear implicitNotFound error for ExecutionContext
|/ /
* | 1f2cd7e512 (origin/2.10.x) Merge pull request #3329 from retronym/ticket/6563
|\ \
| |/
|/|
| * 255c51b3dd (scala/pr/3329) SI-6563 Test case for already-fixed crasher
|/
* 370d6d6188 Merge pull request #3312 from xeno-by/topic/fine-points-of-whiteboxity-210x
|\
| * c0cb1d891a (scala/pr/3312) [nomaster] codifies the state of the art wrt SI-8104
|/
* 97b9b2c06a Merge pull request #3282 from retronym/ticket/8085
|\
| * 7e85b59550 (scala/pr/3282) SI-8085 Fix BrowserTraverser for package objects
| * a12dd9c3b6 Test demonstrating SI-8085
|/
* 5cbb5a7f62 (tag: v2.10.4-RC1) Merge pull request #3268 from adriaanm/support-3021
|\
| * 3fa2c97853 (scala/pr/3268, adriaanm/support-3021) Report error on code size overflow, log method name.
|/
* 2aa9da578e Partially revert f8d8f7d08d.
* ba7bf5e229 Merge pull request #3261 from adriaanm/ticket-6426
|\
| * 47562e7adb (scala/pr/3261, adriaanm/ticket-6426, ticket-6426) Revert "SI-6426, importable _."
* da919ec24c Merge pull request #3253 from retronym/ticket/8062
* f0d913b51d (scala/pr/3253) SI-8062 Fix inliner cycle with recursion, separate compilation
$ g log --oneline --no-merges $MB..97b9b2c06a
7e85b59550 (scala/pr/3282) SI-8085 Fix BrowserTraverser for package objects
a12dd9c3b6 Test demonstrating SI-8085
3fa2c97853 (scala/pr/3268, adriaanm/support-3021) Report error on code size overflow, log method name.
2aa9da578e Partially revert f8d8f7d08d.
47562e7adb (scala/pr/3261, adriaanm/ticket-6426, ticket-6426) Revert "SI-6426, importable _."
f0d913b51d (scala/pr/3253) SI-8062 Fix inliner cycle with recursion, separate compilation
$ g log --oneline --no-merges 97b9b2c06a..370d6d6188
c0cb1d891a (scala/pr/3312) [nomaster] codifies the state of the art wrt SI-8104
$ g log --oneline --no-merges 370d6d6188..aefe3fb844
bd4adf5c97 (scala/pr/3344) More clear implicitNotFound error for ExecutionContext
255c51b3dd (scala/pr/3329) SI-6563 Test case for already-fixed crasher
$ g log --oneline --no-merges aefe3fb844..a8122413c0
5876e8c621 (scala/pr/3345) [nomaster] SI-8114 Binary compat. workaround for erasure bug SI-7120
$ g log --oneline --no-merges a8122413c0..d5801b9eee
c91d373a78 (scala/pr/3328) SI-8111 Expand the comment with a more detailed TODO
2c770ae31a (scala/pr/3327) SI-8111 Repair symbol owners after abandoned named-/default-args
$ g log --oneline --no-merges d5801b9eee..2.10.x
9df2dcc584 (scala/pr/3364) [nomaster] SI-8152 Backport variance validator performance fix
$ g merge 97b9b2c06a
$ g merge -s ours 370d6d6188
$ g merge aefe3fb844
$ g merge -s ours a8122413c0
$ g merge d5801b9eee
$ g merge -s ours 2.10.x
```
|
| | |\ \
| | | | |
| | | | | |
[nomaster] Backport variance validator performance fix
|
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
% time qbin/scalac test/files/pos/t8146-performance.scala
real 0m2.015s
user 0m2.892s
sys 0m0.215s
% time scalac-hash v2.10.3 test/files/pos/t8146-performance.scala
real 1m13.652s
user 1m14.245s
sys 0m0.508s
Cherry-picks one hunk from 882f8e64.
|
| |\| |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
| | |\ \
| | | |/
| | |/| |
Repair symbol owners after abandoned named-/default-args
|
| | | |
| | | |
| | | |
| | | |
| | | | |
As everone knows, undo/reset/retype/rollback are bandaids; we
should try to treat the disease more directly.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Names/Defaults eagerly transforms an application with temporaries
to maintain evaluation order, and dutifully changes owners of
symbols along the way.
However, if this approach doesn't work out, we throw away this
and try a auto-tupling. However, we an still witness symbols
owned by the temporaries.
This commit records which symbols are owned by the context.owner
before `transformNamedApplication`, and rolls back the changes
before `tryTupleApply`.
Perhaps a better approach would be to separate the names/defaults
applicability checks from the evaluation-order-preserving transform,
and only call the latter after we have decided to go that way.
|
| |\| | |
|
| | |\ \
| | | | |
| | | | | |
[nomaster] Binary compat. workaround for erasure bug
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We can't backport SI-7120 to 2.10.x as it changes erased signatures,
which can lead to interop problems between 2.10.3 and 2.10.4.
But, we can detect one of the nasty symptoms -- a bridge method
with the same signature as its target -- and treat that.
This commit detects duplicate bridges in the ASM (only) backend
and removes them.
|
| |\| | | |
|
| | |\ \ \
| | | |/ /
| | |/| | |
More clear implicitNotFound error for ExecutionContext
|
| | |/ / |
|
| | |\ \
| | | |/
| | |/| |
SI-6563 Test case for already-fixed crasher
|
| | |/
| | |
| | |
| | | |
Progressed to working in SI-7636 / c4bf1d5.
|
| |\| |
|
| | |\
| | | |
| | | | |
(2.10.x) codifies the state of the art wrt SI-8104
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As it was discovered in SI-8104, whiteboxity doesn’t apply equally to
type parameters and type members of materialized type classes.
During implicit search and subsequent type inference, whitebox type parameters
are consistently erased to wildcards, whereas whitebox type members sometimes
remain as is and get in the way of signature conformance checks.
Unfortunately, 2.10.x can’t make use of type parameter whiteboxity, because
it requires fundep materializers that were only merged into 2.11:
https://github.com/scala/scala/pull/2499, and therefore Si-8104 seems to be
a hard blocker for 2.10.x at the moment. Stay tuned for updates.
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Check files updated: test/files/presentation/t8085*.check
Conflicts:
build.xml
src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
|
| | |\
| | | |
| | | | |
Fix BrowserTraverser for package objects
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A source file like:
import foo.bar
package object baz
Is parsed into:
package <empty> {
import foo.bar
package baz {
object `package`
}
}
A special case in Namers compensates by adjusting the owner of
`baz` to be `<root>`, rather than `<empty>`.
This wasn't being accounted for in `BrowserTraverser`, which
underpins `-sourcepath`, and allows the presentation compiler to
load top level symbols from sources outside those passes as
the list of sources to compile.
This bug did not appear in sources like:
package p1
package object p2 { ... }
... because the parser does not wrap this in the `package <empty> {}`
This goes some way to explaining why it has gone unnoticed for
so long.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* The presentation compiler sourcepath is now correctly set-up.
* Amazingly enough (for me at least), the outer import in the
package object seem to be responsible of the faulty behavior.
In fact, if you move the import clause *inside* the package object,
the test succeed!
The test's output does provide the correct hint of this:
```
% diff /Users/mirco/Projects/ide/scala/test/files/presentation/t8085-presentation.log /Users/mirco/Projects/ide/scala/test/files/presentation/t8085.check
@@ -1,3 +1,2 @@
reload: NodeScalaSuite.scala
-prefixes differ: <empty>.nodescala,nodescala
-value always is not a member of object scala.concurrent.Future
+Test OK
```
Notice the ``-prefixes differ: <empty>.nodescala,nodescala``. And compare
it with the output when the import clause is placed inside the package
object:
```
% diff /Users/mirco/Projects/ide/scala/test/files/presentation/t8085-presentation.log /Users/mirco/Projects/ide/scala/test/files/presentation/t8085.check
@@ -1,4 +1,2 @@
reload: NodeScalaSuite.scala
-reload: NodeScalaSuite.scala
-open package module: package object nodescala
Test OK
```
Notice now the ``-open package module: package object nodescala``!
|
| | |\
| | | |
| | | | |
Report error on code size overflow, log method name.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
We used to silently skip class files that would exceed the JVM's size limits.
While rare, this should still be an error.
While I was at it, also included the name of the offending method.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Need `${dist.dir}/lib/scala-partest.jar` for maven publish.
We still don't want to distribute it in the distribution,
but will have to remove it in release script, as 2.10.x's
build hasn't been refactoreded like master's, and I'm not backporting it.
|
| | |\
| | | |
| | | | |
Revert ", importable _."
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit d2316df920ffa4804fe51e8f8780240c46efa982.
We can't make `_` an illegal identifier -- it's legal in Java,
so we must be able to name these Java underscores.
|
| | |\ \
| | | |/
| | |/| |
Fix inliner cycle with recursion, separate compilation
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ICodeReaders, which decompiles JVM bytecode to ICode, was not
setting the `recursive` attribute of `IMethod`. This meant that
the inliner got into a cycle, repeatedly inlining the recursive
call.
The method name `filter` was needed to trigger this as the inliner
heuristically treats that as a more attractive inlining candidate,
based on `isMonadicMethod`.
This commit:
- refactors the checking / setting of `virtual`
- adds this to ICodeReaders
- tests the case involving `invokevirtual`
I'm not sure how to setup a test that fails without the other changes
to `ICodeReader` (for invokestatic and invokespecial).
|
|\ \ \ \
| |/ / /
|/| | | |
Fix compilation under -Ydebug
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This need for this output is highly situational and since we've
starting using this resettter in case classes and names/defaults,
it is polluting our consoles.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is the first of two commits to restore workingness
to the compiler under `-Ydebug`.
`ResetAttrs` is now called during case class unapply synthesis,
after the UnTyper was recently banished.
But, this class has some low-level tracing that is triggered
under `-Ydebug` (irrespective of any `-Ylog` settings.)
This tracing code calls `Symbol#toString`, which, in an attempt
to discriminate primary from secondary constructors, accesses
the info of its owner. This is sufficient to hit a dreaded
`CyclicReferenceError`.
The enclosed test compiles a case class under this option
to show that things now compile. It still spews out unwanted
output; this will be removed in the next commit.
|
|\ \ \ \
| | | | |
| | | | | |
Fix EOL-printing in Printers test suite
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix typo
|
| |/ / / /
| | | | |
| | | | | |
In `for inner classes `val mm2 = im.reflectClass(<module symbol>)``, `<module symbol>` should read `<class symbol>`.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
A few minor changes to standard liftable instances and liftable support
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously in some corner situation proper Liftable instance
might not have been resolved.
In particular q"${true}" and q"${""}" used to fail.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previous ones were inscrutable but thankfully @xeno_by
helped me out to find better alternatives.;
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously leaf concrete types were not lifted which
could have caused weird problems when types is too
precise:
val s1 = Some(2)
q"$s1" // used to fail
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previous encoding of Liftables which had universe passed in
as a parameter required a cast to solve path-dependant
madness problems:
trait OldLiftable[T] { def apply(u: Universe, v: T): u.Tree }
In this case compiler wasn't smart enough to find out that
liftFoo(universe, foo)
returns the same type of tree we were working with (universe.Tree)
and we had to cast to make it work:
liftFoo(universe, foo).asInstanceOf[universe.Tree]
Now this cast is redundant as universe is not a parameter of
Liftable's apply.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Make overloading, defaults restriction PolyType aware
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Named/Default args levies an implementation restriction that
only one overloaded alternative may declare defaults.
But, this restriction failed to consider polymorphic methods.
Rather than matching on MethodType, this commit uses `Type#paramms`,
which handles PolyTypes and curried MethodTypes in one fell swoop.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Dotless type application for infix operators.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When you have an aesthetic expresion like
def f(xs: Iterator[Int]) = (
xs takeWhile (_ < 1000)
map (_ * -1)
filter (_ % 2 == 0)
flatMap (x => List(x, x))
reduceOption (_ + _)
maxBy (_.toString)
)
And then for whatever reason you have to perform explicit
type application in the midst of that expression, it's
aggravating in the extreme that it has (had) to be rewritten
in its entirety to accommodate that change.
So now you can perform type application in the middle of it.
For reasons not entirely clear to me postfix operators are
excluded. The discussion as well as the approval for the infix
variation of it can be found at:
https://groups.google.com/forum/#!msg/scala-language/eJl1wnkEz9M/hR984-lqC5EJ
|