summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Align noTraceSuppression val names to system property nameJanek Bogucki2015-07-203-4/+6
| | | | | | | For vals based on the scala.control.noTraceSuppression system property align the val name to the property name. Deprecate the existing val.
* Merge pull request #4629 from adriaanm/unforkjoinSeth Tisue2015-07-20136-76302/+131
|\ | | | | Remove our fork of forkjoin. Java 8 bundles it.
| * Remove further references to forkjoinJason Zaugg2015-07-15115-68894/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use j.u.c.Forkjoin directly in active and disabled tests Remove bitrotted benchmarks code I was going to update these to use `java.util.concurrent.ForkJoin` directly, instead of our deprecated stubs. But most of them don't compile anymore (e.g. scala.testing.Benchmark has been removed, ClassTag imports missing). While I'm all for benchmarks, we should have large swathes of code checked in that isn't at compiled and run automatically. I'm happy to help someone resurrect these in a suitable form.
| * Remove our fork of forkjoin. Java 8 bundles it.Adriaan Moors2015-07-1521-7408/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide deprecated compatibility stubs for the types and static members, which forward as follows: ``` scala.concurrent.forkjoin.ForkJoinPool => java.util.concurrent.ForkJoinPool scala.concurrent.forkjoin.ForkJoinTask => java.util.concurrent.ForkJoinTask scala.concurrent.forkjoin.ForkJoinWorkerThread => java.util.concurrent.ForkJoinWorkerThread scala.concurrent.forkjoin.LinkedTransferQueue => java.util.concurrent.LinkedTransferQueue scala.concurrent.forkjoin.RecursiveAction => java.util.concurrent.RecursiveAction scala.concurrent.forkjoin.RecursiveTask => java.util.concurrent.RecursiveTask scala.concurrent.forkjoin.ThreadLocalRandom => java.util.concurrent.ThreadLocalRandom ``` To prepare for Java 9, the Scala library does not itself use `sun.misc.Unsafe`. However, for now, it provide a convenience accessor for it via `scala.concurrent.util.Unsafe`. This (deprecated) class will be removed as soon as the eco-system drops its use (akka-actor, I'm looking at you).
* | Merge pull request #4639 from lrytz/closure-opt-stabilitySeth Tisue2015-07-161-8/+8
|\ \ | | | | | | Fix bytecode stability when running the closure optimizer
| * | Fix bytecode stability when running the closure optimizerLukas Rytz2015-07-161-8/+8
| | | | | | | | | | | | Fixes the stability regression introduced by #4619.
* | | Merge pull request #4635 from SethTisue/post-m2-version-bumpsSeth Tisue2015-07-161-4/+4
|\ \ \ | | | | | | | | bump versions.properties now that 2.12.0-M2 is out
| * | | bump versions.properties now that 2.12.0-M2 is outSeth Tisue2015-07-161-4/+4
| | |/ | |/|
* | | Merge pull request #4611 from SethTisue/issue/8627Lukas Rytz2015-07-161-1/+3
|\ \ \ | |_|/ |/| | add test coverage for SI-8627 (Stream.filterNot)
| * | add test coverage for SI-8627 (Stream.filterNot)Seth Tisue2015-07-081-1/+3
| | |
* | | Merge pull request #4627 from som-snytt/issue/9396Lukas Rytz2015-07-163-19/+5
|\ \ \ | | | | | | | | SI-9396 Runner computes path only once
| * | | SI-9396 Runner computes path only onceSom Snytt2015-07-133-19/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the classpath URL list in the runner settings to a lazy val. Also clean up PathResolver's use of settings.classpath so that the default is defined in one place, namely in settings, where it can also be overridden. The previous definition in both places was the same, namely, `sys.env.getOrElse("CLASSPATH", ".")`, but the history of the code path is fraught.
* | | | Merge pull request #4630 from lrytz/t9392Lukas Rytz2015-07-161-8/+8
|\ \ \ \ | | | | | | | | | | SI-9392 Clarify the workaround comment and introduce a devWarning
| * | | | SI-9392 Clarify the workaround comment and introduce a devWarningLukas Rytz2015-07-151-8/+8
| | |_|/ | |/| |
* | | | Merge pull request #4626 from SethTisue/java-8-no-more-permgenSeth Tisue2015-07-152-3/+2
|\ \ \ \ | |/ / / |/| | | remove -XX:MaxPermSize=128M; it doesn't exist in Java 8
| * | | remove -XX:MaxPermSize=128M; it doesn't exist in Java 8Seth Tisue2015-07-132-3/+2
| | | |
* | | | Merge pull request #4619 from lrytz/closureOptimizerPerformanceAdriaan Moors2015-07-133-158/+231
|\ \ \ \ | | | | | | | | | | Refactor the ClosureOptimizer, run ProdCons only once per method
| * | | | Refactor the ClosureOptimizer, run ProdCons only once per methodLukas Rytz2015-07-103-158/+231
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor and clean up the ClosureOptimzier. The goal of this change is to run the ProdCons analyzer only once per method, instead of once per closure instantiation. Bootstrapping scala with `-Yopt-inline-heuristics:everything` revealed that ProdCons can take a very long time on large methods, for example ``` [quick.compiler] scala/tools/nsc/backend/jvm/BCodeBodyBuilder$PlainBodyBuilder#genArithmeticOp - analysis: 1 spans, 17755ms [quick.compiler] scala/tools/nsc/typechecker/SuperAccessors$SuperAccTransformer#transform - analysis: 1 spans, 28024ms [quick.compiler] scala/tools/nsc/backend/jvm/BCodeBodyBuilder$PlainBodyBuilder#genInvokeDynamicLambda - analysis: 1 spans, 22100ms ``` With this change and enough time and space (-Xmx6000m), bootstrapping scala succeeds in this test mode.
* | | | Merge pull request #4623 from retronym/ticket/9392v2.12.0-M2Adriaan Moors2015-07-133-0/+28
|\ \ \ \ | | | | | | | | | | SI-9392 Avoid crash in GenBCode for incoherent trees
| * | | | SI-9392 Avoid crash in GenBCode for incoherent treesJason Zaugg2015-07-133-0/+28
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A macro in shapeless was generating a tree of the form: ``` { class C#2 new C#2 }.setType(C#1) ``` This happened due to an error in the macro; it used untypecheck to try to fix the owner-chain consistency problem, but kept a reference to the previous version of the block-local class symbol `C` and used this in the resulting tree. This commit detects the particular situation we encountered, and avoids the crash by not creating the `NestedInfo` for the `BType` corresponding to `C#1`. The code comment discusses why I think this is safe, and suggests a refactoring that would mean we only ever try to construct `NestedInfo` when we are going to need them.
* | | | Merge pull request #4622 from retronym/merge/2.11.x-to-2.12.x-20150713Adriaan Moors2015-07-13175-375/+484
|\ \ \ \ | | | | | | | | | | Merge 2.11.x to 2.12.x [ci: last-only]
| * \ \ \ Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-07-13175-375/+484
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150713 Conflicts: src/eclipse/partest/.classpath src/eclipse/repl/.classpath test/files/run/nothingTypeNoFramesNoDce.scala test/files/run/repl-javap-app.check Also fixup two .classpath files with updated partest, xml and parser combinators JARs.
| | * | | Merge pull request #4604 from vergenzt/update-eclipse-filesAdriaan Moors2015-07-063-3/+3
| | |\ \ \ | | | | | | | | | | | | Update Eclipse classpath entries
| | | * | | Update Eclipse classpath entriesTim Vergenz2015-07-043-3/+3
| | | | | |
| | * | | | Merge pull request #4605 from janekdb/2.11.x-typos-sDick Wall2015-07-0618-24/+24
| | |\ \ \ \ | | | |/ / / | | |/| | | Fix 25 typos (s) - LGTM - thanks, smiles
| | | * | | Fix 25 typos (s)Janek Bogucki2015-07-0618-24/+24
| | |/ / /
| | * | | Merge pull request #4600 from adriaanm/fixup-4564-checkinitAdriaan Moors2015-07-021-1/+7
| | |\ \ \ | | | | | | | | | | | | Correct init order between Pasted and ILoop#pasted
| | | * | | Correct init order between Pasted and ILoop#pastedAdriaan Moors2015-07-021-1/+7
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `testBoth` cannot be a val in `Pasted`, as `Pasted` is inherited by `object paste` in ILoop, which would cause `val testBoth` to be initialized before `val PromptString` was: ``` object paste extends Pasted { val PromptString = prompt.lines.toList.last ``` See https://scala-webapps.epfl.ch/jenkins/job/scala-nightly-checkinit-2.11.x/417. Introduced by #4564.
| | * | | Merge pull request #4596 from janekdb/2.11.x-typos-p-rSeth Tisue2015-07-0121-26/+26
| | |\ \ \ | | | | | | | | | | | | Fix 27 typos (p-r)
| | | * | | Fix 27 typos (p-r)Janek Bogucki2015-06-3021-26/+26
| | | | | |
| | * | | | Merge pull request #4576 from som-snytt/issue/9206-moreSeth Tisue2015-07-0193-265/+174
| | |\ \ \ \ | | | |/ / / | | |/| | | SI-9206 REPL custom bits
| | | * | | SI-9206 De-perk the welcome messageSom Snytt2015-06-256-40/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The welcome message defaults to a sober header followed by one line of instructions.
| | | * | | SI-9206 Update REPL welcome messageSom Snytt2015-06-2486-219/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Everyone knows that a `help` command will result in `more information`. This commit moves the version string to the second line and adds some verve to the welcome. If anyone can't live without the old banner, they are now able to configure it explicitly, so there is still no blood on our hands. ``` $ scala Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions to have them evaluated. Type :help for more information. scala> :quit $ skala Welcome to Scala! version 2.11.7-20150623-155244-eab44dd092 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_40). Type in expressions for evaluation. Or try :help. scala> :quit ``` REPL tests now lop off the actual length of the welcome header; or, if necessary, remove the version number from a header embedded in output.
| | | * | | SI-9206 REPL custom continuation promptSom Snytt2015-06-232-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because who doesn't want to customize their continuation prompt? `scala -Dscala.repl.continue="..."` looks especially nice with `-Dscala.color`. Somewhat works when pasting, but the test rig for running a transcript does not seek to support custom secondary prompts.
| | | * | | SI-9206: REPL custom history fileIgor Racic2015-06-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Specify it with -Dscala.shell.histfile=/path/to/file.
| | | * | | SI-9206: REPL custom welcome messageSom Snytt2015-06-237-17/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can be specified by `-Dscala.repl.welcome=Greeting` or in properties file. It takes the same format arguments as the prompt, viz, version, Java version and JVM name. It can be disabled by `-Dscala.repl.welcome` with no text.
| | | * | | SI-9206: No REPL message on :silent, unless -Dscala.repl.infoIgor Racic2015-06-232-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Anyone who doesn't understand why result printing was turned off after they entered `:silent` mode will start the REPL with `-Dscala.repl.debug` and be enlightened. For infotainment purposes, the verbose message is also emitted under info mode.
| | * | | | Merge pull request #4569 from retronym/ticket/6985Adriaan Moors2015-06-309-2/+102
| | |\ \ \ \ | | | | | | | | | | | | | | SI-6895 Test cases to explain the limitations in tcpoly inference
| | | * | | | SI-8892 Fix incorrect qualification in error messageJason Zaugg2015-06-233-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since beadafa2, we've ended up with nutty error messages for type errors involving aliases that target types in `java.lang` and `scala` packages. I think the intent of that change was to force the error messages to qualify types like `String` when needed, but to leave them unqualified by default. However, this led to this flat out wrong message in the enclosed test. found : B required: C.this.java.lang.B (which expands to) String I've changed the heuristic slightly limit this code to aliases that are eponymous with their targets. Still feels pretty kludgy, but we can at least book a little progress.
| | | * | | | SI-8777 Avoid redundant disambiguation in error messagesJason Zaugg2015-06-234-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When printing types in error messages, we attempt to disambiguate symbol names by qualifying them in various ways. Type paramters symbols are qualified by adding `(in someMethod)`. However, the type errors generated by higher kinded subtyping can contain clones of type parameter symbols, as creater in `isPolySubType`. The disambiguation tries fruitlessly to distinguish them but ended up adding the same suffix to both names repeatedly. ``` found : [F[_]]Foo[[X(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)]Bar[F,X(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)]] required: Foo[[X(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)]Bar[[X]Or[String,X],X(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)(in type L)]] ``` This commit limits the post qualification of type parameter symbols to a single attempt to limit the damage. An alternative might be to mark a clone (we could determine its status by checking whether it is a type parameter of its owner.) But I'm not sure how to present this information in a comphrenensible way, so for now I'm limiting my ambitions to stopping the stutter.
| | | * | | | SI-6895 Test cases to explain the limitations in tcpoly inferenceJason Zaugg2015-06-234-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've determined that the failure in this bug report boils down to SI-2712. Submitting my working as neg tests for posterity. The type error disabmiguator develops a serious stutter with this example. I'll fix that in the following commit.
| | * | | | | Merge pull request #4591 from vsalvis/vsalvis-stringdocSeth Tisue2015-06-302-4/+8
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-8140 Documentation references java.lang.String directly
| | | * | | | | SI-8140 Documentation references java.lang.String directlyvsalvis2015-06-292-4/+8
| | | | | | | |
| | * | | | | | Merge pull request #4588 from retronym/topic/icodishAdriaan Moors2015-06-292-0/+47
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | GenBCode: fix incrementatal compilation by mimicing GenASM
| | | * | | | | | GenBCode: fix incrementatal compilation by mimicing GenASMJason Zaugg2015-06-282-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The incremental compiler in SBT uses an implementation detail of the compiler backend to enumerate the classes that are actually written to disk. This commit mimics this in GenBCode by populating `Run#icode` with an `IClass` for each `ClassDef` processed. We should revisit this by creating a dedicated API for this purpose and migrating SBT to use that. We should also revisit this code as we implement closure elimination in the GenBCode; this commit assumes that all `ClassDef`s that enter the backend will generate classfile products. The enclosed test is extracted from the incrementatl compiler. I've also manually integration tested this with SBT: https://gist.github.com/retronym/fabf6f92787ea9c1ce67
| | * | | | | | | Merge pull request #4586 from som-snytt/issue/missing-argsSeth Tisue2015-06-294-21/+55
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Improved message for missing argument list
| | | * | | | | | | Improved message for missing argument listSom Snytt2015-06-274-21/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarifies the language and rules for eta-expansion. A missing argument in a list, as opposed to a missing argument list, results in a different message. The comical expansion in parens does not attempt to show what was already applied, but succeeds in showing at a glance the shape of the method in question. ``` scala> def m(i: Int, j: Int)(x: Int) = ??? m: (i: Int, j: Int)(x: Int)Nothing scala> m <console>:12: error: missing argument list for method m Unapplied methods are only converted to functions when a function type is expected. You can make this conversion explicit by writing `m _` or `m(_,_)(_)` instead of `m`. m ^ ``` The original submission was due to sschaef and the wording due to adriaanm, with a minor tweak.
| | * | | | | | | | Merge pull request #4589 from janekdb/2.11.x-method-names-m-oJason Zaugg2015-06-294-8/+8
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Improve method names (m-o)
| | | * | | | | | | | Improve method names (m-o)Janek Bogucki2015-06-284-8/+8
| | | |/ / / / / / /
| | * | | | | | | | Merge pull request #4587 from janekdb/2.11.x-typos-m-oDick Wall2015-06-2818-23/+23
| | |\ \ \ \ \ \ \ \ | | | |/ / / / / / / | | |/| | | | | | | Fix 23 typos (m-o)