| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
People are very frequently using c.eval in order to obtain underlying
values of literals. Spinning up a new compiler for that modest purpose
is a gross waste of fossil fuels.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Expose seq field for variable arity definitions
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In 2.11 we've changed TupleClass, ProductClass and FunctionClass
endpoints to be exposed as (Int => Symbol) functions that never throw
exceptions but rather return NoSymbol instead of previous error-prone
indexed access on array that could explode.
While simplifying one use case (indexed access) it complicated
ability to check if symbol at hand is in fact a tuple, product or
function:
(1 to 22).map(TupleClass).toList.contains(symbol)
To cover this extra use case we add a seq method to the variable arity
class definitions that exposes a corresponding sequence of class symbols:
TupleClass.seq.contains(symbol)
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Improve naming of ReadStdin
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We don't need to say everything twice, methods are already prefixed
with “read”.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
deprecates resetAllAttrs and resetLocalAttrs in favor of the new API
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We now have c.untypecheck, which is supposed to be a counterpart of c.typecheck
in the sense that it goes back from typed trees to untyped ones:
http://stackoverflow.com/questions/20936509/scala-macros-what-is-the-difference-between-typed-aka-typechecked-an-untyped.
Let’s hope that c.untypecheck will soon be able to solve our problems
with partially/incorrectly attributed trees emitted by macros:
https://groups.google.com/forum/#!topic/scala-internals/TtCTPlj_qcQ.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This cute little type is necessary for importers to work correctly.
I wonder how we could overlook its existence for almost 2 years.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-8151 Remove -Yself-in-annots and associated implementation
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This experimental option typechecked arguments of annotations
with an injected value in scope named `self`:
@Foo(self.foo < 1)
This has been slated for removal [1] for some time.
This commit removes it in one fell swoop, without any attempt
at source compatibility with code that constructs or pattern
matches on AnnotatedType.
[1] https://groups.google.com/d/msg/scala-internals/VdZ5UJwQFGI/C6tZ493Yxx4J
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix regression with package objects, overloading
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Regressed in f5c336d56, a refactoring of `typedIdent`. In that
commit, an (ostensibly) accidental change arrived, equivalent to:
- val pre1 = if (qual == EmptyTree) NoPrefix else if (sym.isTopLevel) sym.owner.thisType else qual.tpe
+ val pre1 = if (sym.isTopLevel) sym.owner.thisType else if (qual == EmptyTree) NoPrefix else qual.tpe
Here, `qual` is a tree returned in the successful result of
`Context#lookup`.
This change itself looks innocuous (top level symbols can be prefixed
with a qualifier or not, right?), but it exposed us to a bug in
`makeAccessible`. It is responsible for rewriting, e.g,
`scala.List` to `scala.package.List`. It has a few cases, but one
of them relies relies on typechecking `Ident(nme.PACKAGE)`, and
hoping that it will bind to the right place. That's fraught with
danger, and breaks in the enclosed tests.
This commit binds that Ident symbolically, and in the process
factors a tiny bit of code in common with `TreeGen`. (More work
is still needed here!)
In the next commit, I'm going to revert the change to `pre1`. That
would have also fixed the regression, albeit symptomatically.
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
fixes some typos and types
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As suggested by the reviewers, tostringXXX variables in TypeToStrings.scala
have been renamed to toStringXXX.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The parent commit works around a particular problem that led to a compiler
freeze in SI-8158, whereas this commit introduces a general solution -
a cache that tracks all types that we've recursed into during printing.
I can't immediately come up with an example of a type that would be caught
by this safety net, but unknown unknowns are the worst of them all, so why not
guard against them while we can.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Apparently, even though the compiler has safeguards against infinite type
printouts, having a depth counter, we didn’t account for the cases when
printouts are both self-referential and self-multiplying.
For one, SI-8158 provides an example of such a type, which is a structural
type that refers to itself twice in return types of its methods. At first,
printing such a type would go deeper and deeper, but then it will hit
the depth limit and start multiply indefinitely.
This commit fixes this particular problem by recognizing self-references
as this.type’s and printing them out as such. The subsequent commit will
introduce a more general facility.
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
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.
|