summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/2.12.x' into ↵Jason Zaugg2016-02-0455-263/+573
|\ | | | | | | merge/2.11.x-to-2.12.x-20160203
| * Merge pull request #4940 from lrytz/partestUpgradeSeth Tisue2016-02-034-1/+11
| |\ | | | | | | Update partest to 1.0.12, test case for reporting invalid flags
| | * Update partest to 1.0.12, test case for reporting invalid flagsLukas Rytz2016-02-035-2/+12
| | |
| * | Merge pull request #4920 from lrytz/oldOptimizerTestsLukas Rytz2016-02-0349-262/+444
| |\ \ | | | | | | | | restore / rewrite various tests
| | * | Re-write and Re-enable optimizer testsLukas Rytz2016-02-0347-256/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite tests for new optimizer - SI-6941 - SI-2171 - t3430 - t3252 - t4840 - t2171 - t3430 - t3252 - t6157 - t6547 - t8062 - t8306 - t8359 - t9123 - trait-force-info - private-inline test cases for bugs fixed in the new optimizer - SI-9160, the unnecessary boxing mentioned in the ticket is optimzied since push-pop elimination (#4858). - SI-8796 - SI-8524 - SI-7807 fix flags file for t3420 remove an empty flags file remove unnecessary partest filters explicit inliner warnings in test t7582 Restore the lisp test. Removing the flags file - our build runs with the (new) optimizer enabled anyway. The test spent the past few years as an optimizer test in pos/ see https://issues.scala-lang.org/browse/SI-4512. The attempt may fail, but why not give it a try. $ git lg -S"lisp" ... | * | | | f785785 - SI-4579 Yoke the power of lisp.scala as a stress for the optimizer. (3 years, 8 months ago) <Jason Zaugg> ... * | | | | | | 622cc99 - Revert the lisp test. (3 years, 10 months ago) <Paul Phillips> ... * | | | | | | 97f0324 - Revived the lisp test. (3 years, 10 months ago) <Paul Phillips> ... * | 1e0f7dc - Imprison the lisp test, no review. (4 years, 4 months ago) <Paul Phillips> ... * | 6b09630 - "Freed the lisp test." Tweaked partest defaults... (4 years, 6 months ago) <Paul Phillips> ... * | fec42c1 - Lisp test wins again, no review. (4 years, 8 months ago) <Paul Phillips> ... * | 1c2d44d - Restored the lisp.scala test. (4 years, 8 months ago) <Paul Phillips> ... * | 15ed892 - Temporarily sending lisp.scala to be interprete... (4 years, 8 months ago) <Paul Phillips> ...
| | * | show erroneous compiler flags in junit compiler testsLukas Rytz2016-02-031-2/+4
| | | |
| | * | Improve simplifyJumpsLukas Rytz2016-02-031-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve simplifyJumps to rewrite IFEQ L4 L5 GOTO L6 to IFNE L6 L5 This rewrite is only correct if L5 is not the target of any jump instruction (otherwise, removing the GOTO would change semantics). Previously we did not do the rewrite if there was any label between the conditional jump and the goto (like L5). Now we track which labels are jump targets.
| * | | Merge pull request #4737 from soc/SI-9315Lukas Rytz2016-02-031-0/+70
| |\ \ \ | | | | | | | | | | SI-9315 Desugar string concat to java.lang.StringBuilder ...
| | * | | SI-9315 Desugar string concat to java.lang.StringBuilder ...Simon Ochsenreither2016-02-031-0/+70
| | |/ / | | | | | | | | | | | | | | | | | | | | ... instead of scala.collection.mutable.StringBuilder to benefit from JVM optimizations. Unfortunately primitives are already boxed in erasure when they end up in this part of the backend.
| * | / Clarified and expanded which Builders were reusableRex Kerr2016-01-301-0/+48
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This additionally fixes both SI-8648 and SI-9564. Added documentation to Builder to clarify that in general Builders are NOT reusable. Altered implementation of GrowingBuilder to use Growable instance's clear (not valid for a reusable builder, but this one isn't reusable). Added a new marker trait ReusableBuilder that specifies that these builders should be reusable. This trait overrides the clear and result methods while leaving them abstract in order to supply appropriate scaladoc. Made all Array builders Reusable in all cases (by setting capacity to 0 if the original array is returned). (Fixed a poor implmentation of Array[Unit] builder along the way.) Documented which other builders were already reusable (maps, sets, Vector, LazyBuilder, StringBuilder, ListBuffer, etc.).
* | | Merge commit 'cc6fea6' into merge/2.11.x-to-2.12.x-20160203Jason Zaugg2016-02-046-2/+94
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: build.sbt scripts/jobs/integrate/bootstrap
| * \ \ Merge pull request #4927 from szeiger/issue/9572Jason Zaugg2016-02-012-0/+13
| |\ \ \ | | | | | | | | | | SI-9572 Check for illegal tuple sizes in the parser
| | * | | SI-9572 Check for illegal tuple sizes in the parserStefan Zeiger2016-01-282-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds explicit checks with syntax errors for tuple literals and types of more than 22 elements. An alternative approach to fixing SI-9572 would be to revert to the old failure mode of Scala 2.10 where references to arbitrary `scala.TupleXY` would be generated in the parser, which then leads to “type/object not found” errors in the typechecker. This fix here is more intrusive but arguably provides a better user experience. Methods `stripParens` and `makeBinop` are moved from `TreeBuilder` to `Parsers` because they can now generate syntax errors. New methods `makeSafeTupleType` and `makeSafeTupleTerm` implement the error checking on top of `makeTupleType` and `makeTupleTerm`. They are overridden with no-op versions in the quasiquotes parser because it also overrides `makeTupleType` and `makeTupleTerm` in a way that supports arbitrary tuple sizes.
| * | | | SI-9534 Use BoxedUnit in all cases for creating Array[Unit]Stefan Zeiger2016-01-271-1/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling `wrap` or one of the higher-dimension Array factory methods on the `Manifest` for `Unit` led to an exception because it tried to use `void` as a primitive type. Unlike all other primitive Scala types, `Unit` needs to be boxed. The basic `newArray` method was not affected by this bug because it was already special-cased. The fix is to also special-case `arrayClass`.
| * | | Trim complexity in CommentFactoryBaseJanek Bogucki2016-01-252-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Replace option handling with library call 2. Remove NumberFormatException catch presumed to be copy/paste legacy 3. It's Scaladoc 4. Parse trailing whitespace regex once instead of per line 5. Use string interpolation where it improves readability 6. Add missed alternative to block grammar production rule 7. Add regression test for tag requirement warnings
| * | | Merge pull request #4899 from som-snytt/issue/9616Jason Zaugg2016-01-193-12/+81
| |\ \ \ | | | | | | | | | | [backport] SI-9616 False positive in unused import warning
| | * | | [backport] SI-9616 False positive in unused import warningSom Snytt2016-01-073-12/+81
| | | | | | | | | | | | | | | | | | | | This is a minimal backport of the fix for SI-9383.
* | | | | Merge commit 'bf599bc' into merge/2.11.x-to-2.12.x-20160203Jason Zaugg2016-02-037-4/+155
|\| | | | | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/backend/opt/ConstantOptimization.scala src/compiler/scala/tools/nsc/transform/Constructors.scala src/compiler/scala/tools/nsc/typechecker/Contexts.scala src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala src/scaladoc/scala/tools/nsc/doc/html/resource/lib/jquery.layout.js
| * | | disable flaky presentation compiler test on WindowsSeth Tisue2016-01-151-0/+6
| | | | | | | | | | | | | | | | see https://github.com/scala/scala-dev/issues/72 for details
| * | | SI-9605 Searching does not use binary search for ArrayRui Gonçalves2016-01-121-0/+48
| |/ / | | | | | | | | | Binary search should be used for every `IndexedSeqLike` instance and not only for `IndexedSeq`. According the Scaladoc, it is `IndexedSeqLike` that guarantees "constant-time or near constant-time element access and length computation".
| * | Merge pull request #4862 from retronym/ticket/9567Lukas Rytz2015-12-183-0/+66
| |\ \ | | | | | | | | SI-9567 Fix pattern match on 23+ param, method local case class
| | * | SI-9567 Fix pattern match on 23+ param, method local case classJason Zaugg2015-11-252-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typechecking constructor patterns of method local case classes was only working because of the existence of the unapply method in the companion, which is used if navigation to the case class companion object fails. We now support defintion of, and pattern matching on, case classes with more than 22 parameters. These have no `unapply` method in the companion, as we don't have a large enough tuple type to return. So for such case classes, the fallback that we inadvertently relied on would no longer save us, and we'd end up with a compile error advising that the identifier in the constructor pattern was neither a case class nor an extractor. This is due to the propensity of `Symbol#companionXxx` to return `NoSymbol` when in the midst of typechecking. That method should only be relied upon after typechecking. During typechecking, `Namers#companionSymbolOf` should be used instead, which looks in the scopes of enclosing contexts for symbol companionship. That's what I've done in this commit.
| | * | SI-9567 Fix latent bugs in patmat's reasoning about mutabilityJason Zaugg2015-11-251-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under -optimize, the pattern matcher tries to avoid local variables in favour of directly accessing to non-var case class accessors. However, the code that analysed the patterns failed to account properly for repeated parameters, which could either lead to a compiler crash (when assuming that the n-th subpattern must have a corresponding param accessor), or could lead to a correctness problem (when failing to eagerly the bound elements from the sequence.) The test case that tried to cover seems only to have been working because of a separate bug (the primary subject of SI-9567) related to method-local case classes: they were treated during typechecking as extractors, rather than native case classes. The subsequent commit will fix that problem, but first we must pave the way with this commit that emits local vals for bound elements of case class repeated params.
| * | | Merge pull request #4876 from ruippeixotog/issue/9581Seth Tisue2015-12-151-0/+30
| |\ \ \ | | | | | | | | | | SI-9581 Fix overflow on Vector take and drop methods
| | * | | SI-9581 Fix overflow on Vector take and drop methodsRui Gonçalves2015-12-061-0/+30
| | |/ / | | | | | | | | | | | | | | | | | | | | Fixes the index/length comparison in `Vector#take` and `Vector#drop` so that they handle all possible integer values. Given the collection's invariants `startIndex >= endIndex` and `0 >= startIndex, endIndex`, it is sufficient to change the arithmetic in the comparison as done in this commit to avoid overflows. As cases when `n <= 0` are handled beforehand, `endIndex - n` cannot overflow, contrary to `startIndex + n`. If without the danger of overflows the condition yields true, on the other hand, `startIndex + n` cannot overflow as it is smaller than `endIndex` (as the previous formulation of the condition shows).
| * / / Make all of partest work in the sbt buildStefan Zeiger2015-12-041-4/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the scoping of files/lib/*.jar. These files were not on the classpath when running partest from sbt. - Pass the same standard Java options to partest as from the command line. This requires new versions of scala-partest and scala-partest-interface. - Fix the classpath scanning in jvm/innerClassEnclMethodJavaReflection. It only worked for JARs and relative directories but not for absolute directory paths (which are produced by sbt).
* | | SI-9599 Multiple @todo formatted with comma on separate linepeterz2016-01-292-0/+13
| | |
* | | Merge pull request #4917 from retronym/ticket/9629Jason Zaugg2016-01-292-0/+29
|\ \ \ | | | | | | | | SI-9629 Emit missing 'pattern must be a value' error
| * | | SI-9629 Emit missing 'pattern must be a value' errorJason Zaugg2016-01-252-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error used to only be emitted for top-level patterns. This commit moves it into `typedInternal` so it works for nested patterns. It uses the typer mode to know when to fire.
* | | | SI-9398 Treat case classes as one-element ADTs for analysisJason Zaugg2016-01-2914-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, exhaustivity analysis only runs for scrutinees with a sealed type. This commit treats any case class as a one-element, sealed type to enable additional analysis, such as in the new test case.
* | | | SI-9630 Fix spurious warning related to same-named case accessorsJason Zaugg2016-01-299-0/+101
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hash consing of trees within pattern match analysis was broken, and considered `x1.foo#1` to be the same tree as `x1.foo#2`, even though the two `foo`-s referred to different symbols. The hash consing was based on `Tree#correspondsStructure`, but the predicate in that function cannot veto correspondance, it can only supplement the default structural comparison. I've instead created a custom tree comparison method for use in the pattern matcher that handles the tree shapes that we use.
* | | Merge pull request #4735 from soc/SI-9437Lukas Rytz2016-01-267-0/+161
|\ \ \ | | | | | | | | SI-9437 Emit and support parameter names in class files
| * | | SI-9437 Emit and support parameter names in class filesSimon Ochsenreither2016-01-257-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JEP 118 added a MethodParameters attribute to the class file spec which holds the parameter names of methods when compiling Java code with `javac -parameters`. We emit parameter names by default now.
* | | | Rename junit tests to end in *Test to make them run in ANTLukas Rytz2016-01-254-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | Our ANT script only runs junit tests that match *Test.class. https://github.com/scala/scala/blob/1081e718f8f8e174dbf615e42b157e187d3d3886/build.xml#L1467
* | | | Rewrite test: no local for underscoreLukas Rytz2016-01-255-49/+19
| | | |
* | | | Rewrite test: no null in patmatLukas Rytz2016-01-255-40/+13
| | | |
* | | | Rewrite test: no type test on primitives in patmatLukas Rytz2016-01-255-34/+19
| | | |
* | | | Rewrite test for SI-7006Lukas Rytz2016-01-255-61/+24
| | | |
* | | | Rewrite test for inlining higher-order functionsLukas Rytz2016-01-253-92/+20
| | | |
* | | | Rewrite test for inlining from sealed classLukas Rytz2016-01-254-56/+29
| | | |
* | | | Rewrite copy propagation testLukas Rytz2016-01-253-191/+73
| | | |
* | | | Rewrite test for SI-5313Lukas Rytz2016-01-253-67/+92
| | | |
* | | | Rewrite test for SI-6955Lukas Rytz2016-01-252-33/+28
| | | |
* | | | Rewrite test for SI-6956Lukas Rytz2016-01-252-31/+58
| | | |
* | | | Merge remote-tracking branch 'upstream/2.12.x' into opt/elimBoxesLukas Rytz2016-01-24154-392/+768
|\ \ \ \ | | |/ / | |/| |
| * | | Add partial appearance update of inheritence graphs in scaladocFelix Mulder2016-01-231-1/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | This commit updates color and shape of the inheritence graphs. Also adds a dropshadow on hover instead of opacity change. Graphviz broke upon trying to include svg buttons instead of png. Looking for a solution.
| * | SD-70 Don't share footnotes across multiple calls to universe.showRawLukas Rytz2016-01-193-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, multiple invocations of universe.showRaw used a shared weak map that caches footnotes. If the two printed objects have equal components printed as footnotes, e.g., an equal TypeRef, the result of the second invocation depends on whether the object has been collected (and removed from the weak map) or not. See https://github.com/scala/scala-dev/issues/70#issuecomment-171701671
| * | Merge pull request #4903 from som-snytt/issue/9622Jason Zaugg2016-01-181-0/+4
| |\ \ | | | | | | | | SI-9622 Native method may be private
| | * | SI-9622 Native method may be privateSom Snytt2016-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This was lost in a refactor. https://github.com/scala/scala/commit/290f687fb6ab91b6aef62d871036ddc3829f12b4
| * | | Merge pull request #4898 from soc/SI-8700Lukas Rytz2016-01-1410-0/+72
| |\ \ \ | | | | | | | | | | SI-8700 Exhaustiveness warning for enums from Java source