summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Scaladoc jars should go to /api.Adriaan Moors2014-01-211-1/+1
|
* Merge pull request #3382 from soc/topic/std-inJason Zaugg2014-01-214-33/+33
|\ | | | | Improve naming of ReadStdin
| * Improve naming of ReadStdinSimon Ochsenreither2014-01-184-33/+33
| | | | | | | | | | We don't need to say everything twice, methods are already prefixed with “read”.
* | Merge pull request #3392 from xeno-by/topic/untypecheckEugene Burmako2014-01-2119-28/+55
|\ \ | | | | | | deprecates resetAllAttrs and resetLocalAttrs in favor of the new API
| * | deprecates resetAllAttrs and resetLocalAttrs in favor of the new APIEugene Burmako2014-01-2112-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | moves analyzer.ImportType into scala.reflect.internalEugene Burmako2014-01-217-8/+14
| | | | | | | | | | | | | | | This cute little type is necessary for importers to work correctly. I wonder how we could overlook its existence for almost 2 years.
* | | Merge pull request #3368 from retronym/ticket/8151Grzegorz Kossakowski2014-01-2127-138/+55
|\ \ \ | | | | | | | | SI-8151 Remove -Yself-in-annots and associated implementation
| * | | SI-8151 Remove -Yself-in-annots and associated implementationJason Zaugg2014-01-1527-138/+55
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #3365 from retronym/ticket/8133Jason Zaugg2014-01-217-6/+44
|\ \ \ | | | | | | | | Fix regression with package objects, overloading
| * | | SI-8133 Fix regression with package objects, overloadingJason Zaugg2014-01-147-6/+44
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #3385 from xeno-by/ticket/8158Eugene Burmako2014-01-2010-19/+96
|\ \ \ | | | | | | | | fixes some typos and types
| * | | temporarily disables the toStringSubjects cacheEugene Burmako2014-01-201-7/+12
| | | |
| * | | addresses pull request feedbackEugene Burmako2014-01-203-3/+3
| | | |
| * | | capitalizes “s” in tostringEugene Burmako2014-01-203-19/+19
| | | | | | | | | | | | | | | | | | | | As suggested by the reviewers, tostringXXX variables in TypeToStrings.scala have been renamed to toStringXXX.
| * | | introduces failsafe against endless type printingEugene Burmako2014-01-203-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | SI-8158 compiler hangs printing out fancy typesEugene Burmako2014-01-205-5/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | fixes a typo in Types.scalaEugene Burmako2014-01-191-1/+1
| | | |
| * | | quasiquotes no longer evaluate debug logs when debug logging is offEugene Burmako2014-01-191-2/+2
| | | |
* | | | Merge pull request #3384 from adriaanm/merge-2.10.xv2.11.0-M8Adriaan Moors2014-01-192-5/+31
|\ \ \ \ | |/ / / |/| | | Merge 2.10.x
| * | | Merge 2.10.x into masterAdriaan Moors2014-01-182-5/+31
|/| | |
| * | | Merge pull request #3356 from retronym/ticket/8138Jason Zaugg2014-01-182-5/+31
| |\ \ \ | | | | | | | | | | Fix bug with super-accessors / dependent types
| | * | | SI-8143 Fix bug with super-accessors / dependent typesJason Zaugg2014-01-122-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 pull request #3383 from adriaanm/merge-2.10.xAdriaan Moors2014-01-1831-28/+231
|\ \ \ \ \ | | | | | | | | | | | | Merge 2.10.x
| * | | | | Merge 2.10.x into masterAdriaan Moors2014-01-170-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
| | * | | | Merge pull request #3364 from retronym/ticket/8152Jason Zaugg2014-01-152-3/+18
| | |\ \ \ \ | | | | | | | | | | | | | | [nomaster] Backport variance validator performance fix
| | | * | | | [nomaster] SI-8152 Backport variance validator performance fixJason Zaugg2014-01-142-3/+18
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | % 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.
| * | | | | Merge commit 'd5801b9eee' from 2.10.x into masterAdriaan Moors2014-01-172-0/+47
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
| | * | | | Merge pull request #3328 from retronym/ticket/8111v2.10.4-RC2Jason Zaugg2014-01-122-0/+47
| | |\ \ \ \ | | | |/ / / | | |/| | | Repair symbol owners after abandoned named-/default-args
| | | * | | SI-8111 Expand the comment with a more detailed TODOJason Zaugg2014-01-081-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As everone knows, undo/reset/retype/rollback are bandaids; we should try to treat the disease more directly.
| | | * | | SI-8111 Repair symbol owners after abandoned named-/default-argsJason Zaugg2014-01-062-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Merge commit 'a8122413c0' into merge-2.10.xAdriaan Moors2014-01-170-0/+0
| |\| | | |
| | * | | | Merge pull request #3345 from retronym/ticket/8114Jason Zaugg2014-01-112-1/+41
| | |\ \ \ \ | | | | | | | | | | | | | | [nomaster] Binary compat. workaround for erasure bug
| | | * | | | [nomaster] SI-8114 Binary compat. workaround for erasure bug SI-7120Jason Zaugg2014-01-092-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | Merge commit 'aefe3fb844' into merge-2.10.xAdriaan Moors2014-01-172-0/+12
| |\| | | | |
| | * | | | | Merge pull request #3344 from jamesward/fix/ec-implicit-errorJason Zaugg2014-01-091-1/+1
| | |\ \ \ \ \ | | | |/ / / / | | |/| | | | More clear implicitNotFound error for ExecutionContext
| | | * | | | More clear implicitNotFound error for ExecutionContextJames Ward2014-01-081-1/+1
| | |/ / / /
| | * | | | Merge pull request #3329 from retronym/ticket/6563Eugene Burmako2014-01-062-0/+12
| | |\ \ \ \ | | | |/ / / | | |/| | | SI-6563 Test case for already-fixed crasher
| | | * | | SI-6563 Test case for already-fixed crasherJason Zaugg2014-01-062-0/+12
| | |/ / / | | | | | | | | | | | | | | | Progressed to working in SI-7636 / c4bf1d5.
| * | | | Merge commit '370d6d6188' into merge-2.10.xAdriaan Moors2014-01-170-0/+0
| |\| | |
| | * | | Merge pull request #3312 from xeno-by/topic/fine-points-of-whiteboxity-210xJason Zaugg2013-12-306-0/+98
| | |\ \ \ | | | | | | | | | | | | (2.10.x) codifies the state of the art wrt SI-8104
| | | * | | [nomaster] codifies the state of the art wrt SI-8104Eugene Burmako2013-12-286-0/+98
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Merge commit '97b9b2c06a' from 2.10.x into masterAdriaan Moors2014-01-1727-28/+172
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | Merge pull request #3282 from retronym/ticket/8085Adriaan Moors2013-12-1813-2/+110
| | |\ \ \ | | | | | | | | | | | | Fix BrowserTraverser for package objects
| | | * | | SI-8085 Fix BrowserTraverser for package objectsJason Zaugg2013-12-1811-13/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * | | Test demonstrating SI-8085Mirco Dotta2013-12-186-0/+55
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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``!
| | * | | Merge pull request #3268 from adriaanm/support-3021v2.10.4-RC1Adriaan Moors2013-12-124-6/+37
| | |\ \ \ | | | | | | | | | | | | Report error on code size overflow, log method name.
| | | * | | Report error on code size overflow, log method name.Adriaan Moors2013-12-124-6/+37
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Partially revert f8d8f7d08d.Adriaan Moors2013-12-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Merge pull request #3261 from adriaanm/ticket-6426Adriaan Moors2013-12-114-18/+6
| | |\ \ \ | | | | | | | | | | | | Revert ", importable _."
| | | * | | Revert "SI-6426, importable _."Adriaan Moors2013-12-104-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.