summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2407 from paulp/pr/immutable-tailcallsAdriaan Moors2013-05-031-116/+111
|\ | | | | Rewrite TailCalls for performance and immutability.
| * Rewrite TailCalls for performance and immutability.Paul Phillips2013-04-171-116/+111
| | | | | | | | | | | | | | | | | | | | | | While logging symbols created after typer, I discovered that TailCalls was far and away the largest creator. It turns out this was due to a bug where thousands of labels were eagerly created during tail call analysis, even if the method weren't tail recursive and no label would ever be required. This commit shaves 10% off the total number of method symbol creations (compiling quick.lib drops from 88K to 80K.)
* | Merge pull request #2483 from adriaanm/merge-2.10.xPaul Phillips2013-05-0239-116/+525
|\ \ | | | | | | Merge 2.10.x
| * \ Merge 2.10.x into masterAdriaan Moors2013-05-0239-116/+525
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bincompat-forward.whitelist.conf src/compiler/scala/tools/nsc/matching/Patterns.scala src/compiler/scala/tools/nsc/transform/patmat/Logic.scala src/compiler/scala/tools/nsc/typechecker/Infer.scala src/scaladoc/scala/tools/nsc/doc/model/ModelFactory.scala test/files/neg/t5663-badwarneq.check
| | * \ Merge pull request #2475 from adriaanm/build-relative-symlinkAdriaan Moors2013-05-021-1/+3
| | |\ \ | | | | | | | | | | use relative symlink in distpack
| | | * | use relative symlink in distpackAdriaan Moors2013-04-301-1/+3
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | To simplify building a release on jenkins, we run distpack-opt in one job, store the `dists/` directory in a tar ball, archive that artifact and copy it to the downstream jobs that package on windows and unix. To make the tarball portable between machines, it must not use absolute symlinks.
| | * | Merge pull request #2471 from paulp/pr/2.10.2/6532Paul Phillips2013-04-301-0/+2
| | |\ \ | | | | | | | | | | SI-6532 emit debug info in compiled java.
| | | * | SI-6532 emit debug info in compiled java.Paul Phillips2013-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our handful of java source files weren't being compiled with line numbers, sourcefile, and other debugger aids. I don't really know how to test this so I'll enclose an excerpt of the bytecode diff of scala.runtime.IntRef to show that this change results in debug information. 2,3c2,4 > Compiled from "IntRef.java" 4a6 > SourceFile: "IntRef.java" 53a62,67 > LineNumberTable: > line 18: 0 > LocalVariableTable: > Start Length Slot Name Signature > 0 10 0 this Lscala/runtime/IntRef; > 0 10 1 elem I 62a77,81 > LineNumberTable: > line 19: 0 > LocalVariableTable: > Start Length Slot Name Signature > 0 8 0 this Lscala/runtime/IntRef;
| | * | | Merge pull request #2432 from retronym/ticket/delayed-init-refPaul Phillips2013-04-304-0/+64
| | |\ \ \ | | | |/ / | | |/| | Warn on selection of vals from DelayedInit subclasses.
| | | * | Warn on selection of vals from DelayedInit subclasses.Jason Zaugg2013-04-234-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which are likely to yield null, if the program didn't start. This is a common source of confusion for people new to the language, as was seen during the Coursera course. The test case shows that the usage pattern within Specs2 won't generate these warnings.
| | * | | Merge pull request #2439 from retronym/ticket/7369Adriaan Moors2013-04-276-11/+123
| | |\ \ \ | | | | | | | | | | | | SI-7369 Avoid spurious unreachable warnings in patterns
| | | * | | SI-7369 Avoid spurious unreachable warnings in patternsJason Zaugg2013-04-246-11/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unreachability analysis draws on the enumerated domain of types (e.g sealed subclasses + null, or true/false), and also looks at all stable identifier patterns tested for equality against the same 'slot' in a pattern. It was drawing the wrong conclusions about stable identifier patterns. Unlike the domain constants, two such values may hold the same value, so we can't assume that matching X precludes matching Y in the same slot in a subsequent case. For example: val X: Boolean = true; val Y: Boolean = true def m1(t1: Tuple1[Boolean]) = t1 match { case Tuple1(true) => case Tuple1(false) => case Tuple1(false) => // correctly unreachable } def m2(t1: Tuple1[Boolean]) = t1 match { case Tuple1(X) => case Tuple1(Y) => // spurious unreachable warning } // // Before // reachability, vars: V2: Boolean ::= true | false// Set(false, Y, X, true) // = x1._1 V1: (Boolean,) ::= null | ... // = x1 equality axioms: V2=true#4 \/ V2=false#5 /\ -V2=false#5 \/ -V2=Y#3 /\ -V2=false#5 \/ -V2=X#2 /\ -V2=false#5 \/ -V2=true#4 /\ -V2=Y#3 \/ -V2=X#2 /\ -V2=Y#3 \/ -V2=true#4 /\ -V2=X#2 \/ -V2=true#4 // // After // reachability, vars: V2: Boolean ::= true | false// Set(false, Y, X, true) // = x1._1 V1: (Boolean,) ::= null | ... // = x1 equality axioms: V2=true#4 \/ V2=false#5 /\ -V2=false#5 \/ -V2=true#4
| | * | | | Merge pull request #2392 from vigdorchik/ticket/si-7367Paul Phillips2013-04-264-27/+55
| | |\ \ \ \ | | | | | | | | | | | | | | SI-7367 scaladoc crash on constructing the model for annotations.
| | | * | | | SI-7367 scaladoc crash on constructing the model for annotations.Eugene Vigdorchik2013-04-254-27/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scaladoc only checks primary constructor when building annotation model. Here we instead find the constructor matching the annotation's symbol. Also change TreeFactory.makeTree to return TreeEntity rather than Option[TreeEntity] and force the caller check for EmptyTree.
| | * | | | | Merge pull request #2449 from heathermiller/readmefixAdriaan Moors2013-04-251-1/+1
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Corrects link in README.rst
| | | * | | | | Corrects link in README.rstHeather Miller2013-04-251-1/+1
| | |/ / / / /
| | * | | | | Merge pull request #2448 from namin/update-linksHeather Miller2013-04-252-11/+6
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Update links to old website, in preparation for launch.
| | | * | | | | Update links to old website, in preparation for launch.Nada Amin2013-04-252-11/+6
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the contact form, since it's redundant with mailing lists and issue tracker.
| | * | | | | Merge pull request #2444 from paulp/pr/value-class-cmp-warningPaul Phillips2013-04-253-17/+67
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-6943 warn on value class miscomparison.
| | | * | | | | SI-6943 warn on value class miscomparison.Paul Phillips2013-04-243-17/+67
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a very dangerous situation running around when you combine universal equality with value classes: // All over your code val x = "abc" if (x == "abc") ... // Hey let's make x a value class val x = new ValueClass("abc") // Uh-oh There was until now no warning when comparing a value class with something else. Now there is.
| | * | | | | Merge pull request #2420 from retronym/ticket/6675-2Jason Zaugg2013-04-239-11/+57
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-6675 Avoid spurious warning about pattern bind arity.
| | | * | | | | SI-6675 Avoid spurious warning about pattern bind arity.Jason Zaugg2013-04-219-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 692372ce, we added a warning (under -Xlint) when binding a `TupleN` in to a single pattern binder, which wasn't allowed before 2.10.0, and more often than not represents a bug. However, that warning overstretched, and warned even when using a Tuple Pattern to bind to the elements of such a value. This commit checks for this case, and avoids the spurious warnings. A new test case is added for this case to go with the existing test for SI-6675: $ ./tools/partest-ack 6675 % tests-with-matching-paths ... 3 % tests-with-matching-code ... 2 # 3 tests to run. test/partest --show-diff --show-log \ test/files/neg/t6675-old-patmat.scala \ test/files/neg/t6675.scala \ test/files/pos/t6675.scala \ "" Testing individual files testing: [...]/files/pos/t6675.scala [ OK ] Testing individual files testing: [...]/files/neg/t6675-old-patmat.scala [ OK ] testing: [...]/files/neg/t6675.scala [ OK ] All of 3 tests were successful (elapsed time: 00:00:03)
| | * | | | | | Merge pull request #2435 from retronym/ticket/7355Jason Zaugg2013-04-231-2/+3
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-7355 Handle spaces in paths in Windows batch files.
| | | * | | | | | SI-7355 Handle spaces in paths in Windows batch files.Bjorn Regnell2013-04-231-2/+3
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed "%1%" and %2% to "%~1" and %~2 to allow spaces in paths by surrounding quotes according to advice at: http://stackoverflow.com/questions/473117/pass-path-with-spaces-as-parameter-to-bat-file http://ss64.com/nt/syntax-args.html
| | * | | | | | Merge pull request #2387 from vigdorchik/interactive_scaladocAdriaan Moors2013-04-221-2/+4
| | |\ \ \ \ \ \ | | | |_|_|/ / / | | |/| | | | | Interactive scaladoc: demand new typer run when done.
| | | * | | | | Interactive scaladoc: mark new typer run when done.Eugene Vigdorchik2013-04-171-2/+4
| | | | |/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | As of now, when backgroundCompile is in the same typer run as scaladoc-fetching logic, typer is confused with stale symbols.
| | * | | | | Merge pull request #2358 from adriaanm/ticket-7330Jason Zaugg2013-04-217-31/+43
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-7330 better error when pattern's not a value
| | | * | | | | SI-7330 better error when pattern isn't a valueAdriaan Moors2013-04-087-31/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somehow an applied type managed to sneak past the type checker in pattern mode. Patterns must be values, though. `case C[_] =>` was probably meant to be `case _: C[_] =>` Advice is dispensed accordingly. (Generalizing the existing advice machinery.)
| | * | | | | | Merge pull request #2410 from paulp/pr/parameterized-implicitJason Zaugg2013-04-213-4/+19
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Quiet down overloaded implicit warning.
| | | * | | | | | Quiet down overloaded implicit warning.Paul Phillips2013-04-183-4/+19
| | | | |_|/ / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently implicit classes product both a method symbol and a module symbol, both of which are marked implicit, which left this warning code believing there was an overloaded implicit method.
| | * | | | | | Merge pull request #2322 from retronym/ticket/7200Jason Zaugg2013-04-202-0/+84
| | |\ \ \ \ \ \ | | | |_|_|_|/ / | | |/| | | | | SI-7200 Test case for fixed type inference error.
| | | * | | | | SI-7200 Test case for fixed type inference error.Jason Zaugg2013-03-272-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broken in 2.9.2 and 2.10.0, but working in 2.10.1 --- sandbox/2.10.0.log +++ sandbox/2.10.1.log def coflatMap[A >: Nothing <: Any, B >: Nothing <: Any](f: Test.Nel[A] => B): Test.Nel[A] => Test.Nel[B] = ((l: Test.Nel[A]) => Test.this.Nel.apply[B](f.apply(l), l.tail match { case immutable.this.Nil => immutable.this.Nil - case (hd: A, tl: List[A])scala.collection.immutable.::[A]((h @ _), (t @ _)) => { - val r: Test.Nel[Nothing] = NelFoo.this.coflatMap[A, Nothing](f).apply(Test.this.Nel.apply[A](h, t)); + case (hd: A, tl: List[A])scala.collection.immutable.::[?A1]((h @ _), (t @ _)) => { + val r: Test.Nel[B] = NelFoo.this.coflatMap[A, B](f).apply(Test.this.Nel.apply[A](h, t)); { - <synthetic> val x$1: Nothing = r.head; - r.tail.::[Nothing](x$1) + <synthetic> val x$1: B = r.head; + r.tail.::[B](x$1) } } })) b74c33eb86 represents the exact moment of progression. Comments in pos/t7200b.scala, a minimal test that demonstrates the problem without type constructors or code execution, pinpoint the line of code responsible for the fix. Incidentally, I'm currently on a train somewhere between Solothurn and Biel, and am consequently without the power of scala-bisector. Undeterred, and inspired by a line I saw in Skyfall last night ("sometimes the olds ways are better"), I just pulled off a two-hop bisection. Take that, O(log N)! The one remaining worry is the appearance of the type variable ?A1 in the output of -Xprint:typer for run/t7200.scala.
* | | | | | | | Merge pull request #2406 from paulp/issue/7362Paul Phillips2013-04-3015-690/+764
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-7362, crash in presentation compiler
| * | | | | | | | More useful checkfile output in interactive tests.Paul Phillips2013-04-3012-698/+698
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I resisted the urge to fix "aksTypeCompletion" for as long as I possibly could. While I was there I threw in what seem to be like significant output improvements, but you tell me.
| * | | | | | | | SI-7362, crash in presentation compiler.Paul Phillips2013-04-304-13/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code by retronym, test by huitseeker, I just move stuff around.
* | | | | | | | | Merge pull request #2476 from paulp/pr/2446-passingPaul Phillips2013-04-3035-422/+808
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Partest PR up to the passing commit.
| * | | | | | | | | SI-7409 Par-Test: A crash is not a DNC for neg testsSom Snytt2013-04-303-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compiler crash does not count as Does Not Compile for purposes of a negative test. Changing the test kind from "neg" to "dnc" is out of scope for this PR. Even if the user asks to update the check file with the crash result, we must prevent him from doing so. Any further attempts to update the check file with a crash will dispatch the Scala SWAT squad which will race to his location and physically restrain the user. Only Martin holds the code which will allow the squad to stand down. So make sure his cell is on next time you want to --update-check. A neg test will stop trying to compile after the first failed round, which is all that matters. By popular request, a new test outcome is emitted when the check file is updated. It is called "Updated". It even has its own short status, the double-plus that is reminiscent of diff output.
| * | | | | | | | | Partest has an optionable wait period.Som Snytt2013-04-305-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partest --timeout "30 seconds" to time out the test run. It will not hang on timeout ("I hang with Par-Test" t-shirts not-withstanding). It's beyond the scope of this commit to investigate argument parsing: `partest --timeout "\"30 seconds"\" --pos`
| * | | | | | | | | SI-7349 Partest supports test-interfaceSom Snytt2013-04-3014-265/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partest uses test-interface API to invoke ScalaCheck. This obviates ad hoc output checking for result status. The context class loader is set to a loader that the scaladoc scalacheck tests can use.
| * | | | | | | | | Update ScalaCheck to 1.10.1.Som Snytt2013-04-3016-124/+446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Puts test-interface on the class path.
| * | | | | | | | | Partest testnum field width is sensitive to total testsSom Snytt2013-04-302-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the hyphens to line up on a column within the output for a test category or "kind". ``` $ partest files/neg/t4134.scala --run Selected 1348 tests drawn from 1 named test categories, specified tests & starting 1 test in neg ok 1 - neg/t4134.scala & starting 1347 tests in run ok 1 - run/absoverride.scala ok 2 - run/amp.scala ok 3 - run/adding-growing-set.scala ```
| * | | | | | | | | SI-7358 Partest fails on scalacheck failureSom Snytt2013-04-301-14/+18
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A failing test generates a test failure. The failure log is added to the transcript. The log stream is closed when done.
* | | | | | | | | Merge pull request #2453 from magarciaEPFL/backendish6Paul Phillips2013-04-301-13/+18
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | SI-7422 GenASM populates and clears its maps within a Run
| * | | | | | | | no need to manually clear perRunCaches in GenASMMiguel Garcia2013-04-271-3/+0
| | | | | | | | |
| * | | | | | | | maps in GenASM guaranteed mem-leak-free by perRunCachesMiguel Garcia2013-04-261-2/+2
| | | | | | | | |
| * | | | | | | | SI-7422 GenASM populates and clears its maps within a RunMiguel Garcia2013-04-261-11/+19
| | | | | | | | |
* | | | | | | | | Merge pull request #2428 from hubertp/issue/7291Paul Phillips2013-04-3010-117/+165
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-7291: Don't throw exceptions while encountering diverging expansion.
| * | | | | | | | | SI-7291: Remove error kinds.Hubert Plociniczak2013-04-264-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What seemed like a good idea initially (since potentially there were many different kinds of errors that could be treated specially), started to complicate the error logic. So let's just match on the specific instance of an error to manipulate the buffer.
| * | | | | | | | | SI-7291: No exception throwing for diverging implicit expansionHubert Plociniczak2013-04-269-76/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't throw exceptions for normal errors it was a bit odd that we don't do that for DivergingImplicit. As SI-7291 shows, the logic behind catching/throwing exception was broken for divergence. Instead of patching it, I rewrote the mechanism so that we now another SearchFailure type related to diverging expansion, similar to ambiguous implicit scenario. The logic to prevent diverging expansion from stopping the search had to be slightly adapted but works as usual. The upside is that we don't have to catch diverging implicit for example in the presentation compiler which was again showing that something was utterly broken with the exception approach.
* | | | | | | | | | Merge pull request #2459 from magarciaEPFL/backendish7Paul Phillips2013-04-303-28/+74
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | similar in purpose to -Ygen-javap but with some advantages: -Ygen-asmp