summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3742 from retronym/topic/8578Jason Zaugg2014-05-123-2/+21
|\ | | | | SI-8578 Avoid fresh name clashes under -Ydelambdafy:method
| * SI-8578 Avoid another potential fresh name clashJason Zaugg2014-05-111-1/+1
| | | | | | | | | | No test case for this one, but see the preceding commit for the class of bug that I'm trying to avoid.
| * SI-8578 Avoid fresh name clashes under -Ydelambdafy:methodJason Zaugg2014-05-113-1/+20
| | | | | | | | | | It is important to append the fresh 'N' after '$'. Otherwise, we find out the hard way that ("foo$11" + "1") == ("foo$1" + "11").
* | Merge pull request #3722 from som-snytt/issue/8325-spec-updateAdriaan Moors2014-05-121-2/+1
|\ \ | |/ |/| Issue/8325 spec update
| * SI-8325 Spec accepts infix type *Som Snytt2014-05-071-2/+1
| | | | | | | | | | | | Remove the clause in 3.2.8 that reserves `*` as a postfix modifier thing. For emphasis, the language that an infix type name can be an arbitrary identifier is retained, sans buts.
* | Merge pull request #3739 from retronym/ticket/8549-partial-revertJason Zaugg2014-05-111-23/+34
|\ \ | | | | | | SI-8576 Temporarily disable part of serialization test
| * | SI-8576 Temporarily disable part of serialization testJason Zaugg2014-05-101-23/+34
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parts of this test fail if testing a library built with -Xcheckinit. The failures seem to be in two categories: - A component of the serialized structure does not have a declared SerialVersionUID, meaning that the extra field added to track initialization results in a different ID. This manifests as a `java.io.InvalidClassException` when deserializing the blobs of data saved in the test case. - Spurious `UnitializedFieldErrors` when calling methods on the object that has been serialized and then deserialized. Until we figure out the right course of action (more @SerialVersionUID annotations / weaker tests / ...), this commit disabled those tests.
* | Merge pull request #3730 from lrytz/checkinitJason Zaugg2014-05-0910-35/+87
|\ \ | | | | | | Fix checkinit build
| * | Disable run/t7974 under checkinitLukas Rytz2014-05-092-1/+2
| | |
| * | Clarify and clean up trait getter / setter generationLukas Rytz2014-05-091-35/+54
| | |
| * | SI-8570 set the checkinit bit for unit-typed fields of traitsLukas Rytz2014-05-096-3/+33
| | | | | | | | | | | | Fix only, refactoring in subsequent commit.
| * | Fix run/t5256h.scala under checkinitLukas Rytz2014-05-081-1/+2
| | |
| * | Fix run/t3569.scala under checkinitLukas Rytz2014-05-081-1/+2
| | |
* | | Merge pull request #3734 from retronym/topic/master-to-2.11.x-2Jason Zaugg2014-05-098-6/+79
|\ \ \ | | | | | | | | Merge master to 2.11.x
| * | | Merge origin/master into topic/master-to-2.11.x-2Jason Zaugg2014-05-098-6/+79
|/| | |
| * | | Merge pull request #3732 from retronym/revert/5905Jason Zaugg2014-05-092-5/+4
| |\ \ \ | | | | | | | | | | Revert "SI-5905 Clarify test case"
| | * | | Revert "SI-5905 Clarify test case"Jason Zaugg2014-05-092-5/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 78bd175afcc89878ca1c00cce69d0517909c6ff3. See discussion: https://github.com/scala/scala/pull/3597#commitcomment-6270375
| * | | Merge pull request #3597 from som-snytt/issue/5905-feature-helpJason Zaugg2014-05-097-6/+80
| |\ \ \ | | | | | | | | | | SI-5905 Sanity check -language options
| | * | | SI-5905 Clarify test caseSom Snytt2014-05-082-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The language feature options are discovered reflectively, but it is nice to enforce that expected options are supplied. Short of that, the code string includes a rowdy postfix operator. It still does enforce that at least one option was discovered. Delete -nowarn flags file. Let's see if that was to suppress a warning in the standard build.
| | * | | SI-5905 Restore -language:_Som Snytt2014-03-023-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Underscore means all. -x:c,b,a,_ results in value c,b,a,a,b,c,d,... Currently, -Xprint does not present phases as a closed set of choices; there is ad hoc checking in Global. That would be a nice unification. (You don't know the list of choices until after global is constructed.)
| | * | | SI-5905 Sanity check -language optionsSom Snytt2014-02-287-5/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option names are hardcoded, but checked by a test. There are no hooks to verify options after the compiler is constructed. Introduced a `MultiChoiceSetting` required for the setting creation framework.
* | | | | Merge pull request #3719 from retronym/ticket/8546Jason Zaugg2014-05-095-5/+54
|\ \ \ \ \ | | | | | | | | | | | | SI-8546 Pattern matcher analysis foiled by over-widening
| * | | | | SI-8546 Pattern matcher analysis foiled by over-wideningJason Zaugg2014-05-075-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the enclosed test, the prefix checkable type `ModuleTypeRef(F2.this, C)` was being inadvertently widened to `ModuleTypeRef(F2[?], C)`. This started after some misguided future-proofing in SI-6771 / 3009916. This commit changes the `dealiasWiden` to a `delias`.
* | | | | | Merge pull request #3727 from retronym/ticket/8531Jason Zaugg2014-05-093-2/+35
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8531 Better space efficiency for patmat analysis
| * | | | | | SI-8531 Better space efficiency for patmat analysisJason Zaugg2014-05-083-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding logging to `clause`, I found that the majority of calls provide 0 or 1 elements. In SI-7020 / 69557da55, we changed this method to use a `LinkedHashSet` to have deterministic results for clauses with more elements. But I suspect that this contributes to higher memory usage from the pattern matcher. The enclosed test case, carefully whittled down by @oxbowlakes, used to consume an inordinate amount of memory and time. After this patch, it is back to 2.10.4 performance. I have run `neg/t7020.scala` in a loop and it still is deterministic.
* | | | | | | Merge pull request #3729 from retronym/merge/master-to-2.11.xAdriaan Moors2014-05-0927-23/+352
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Merge master to 2.11.x
| * \ \ \ \ \ \ Merge commit 'b5392a0' into merge/master-to-2.11.xJason Zaugg2014-05-0927-23/+352
| |\ \ \ \ \ \ \ | | | |_|/ / / / | | |/| | | | |
| | * | | | | | Merge pull request #3704 from gourlaysama/wip/t8504Jason Zaugg2014-05-082-1/+11
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8504 fix NPE in the Java wrapper for a Scala Map.
| | | * | | | | | SI-8504 fix NPE in the Java wrapper for a Scala Map.Antoine Gourlay2014-04-292-1/+11
| | | | |/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | MapWrapper blindly calls .hashCode on keys that can very well be null.
| | * | | | | | Merge pull request #3689 from xeno-by/ticket/8523Jason Zaugg2014-05-083-1/+12
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | makes bundles friendly to -Ywarn-dead-code
| | | * | | | | | makes bundles friendly to -Ywarn-dead-codeEugene Burmako2014-04-213-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, the `new Bundle(???).impl` synthetic tree generated as a macro impl ref for bundles evokes -Ywarn-dead-code warnings. This pull requests changes `???` to `null` in order not to stress out the checker. What's in the argument doesn't actually make any difference anyway.
| | * | | | | | | Merge pull request #3706 from gourlaysama/wip/t8550Jason Zaugg2014-05-081-1/+1
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-8550 fix scaladoc for the default s.c.LinearSeq.
| | | * | | | | | | SI-8550 fix scaladoc for the default s.c.LinearSeq.Antoine Gourlay2014-04-301-1/+1
| | | | |/ / / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default LinearSeq is a List (LinearSeq.newBuilder delegates to immutable.LinearSeq.newBuilder, whose default is List).
| | * | | | | | | Merge pull request #3711 from retronym/ticket/8549-2Jason Zaugg2014-05-0810-10/+231
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-8549 Serialization: fix regression with @SerialVersionUID / start enforcing backwards compatibility
| | | * | | | | | | SI-6988 Test case for non-literal / non-constant SerialVersionUIDJason Zaugg2014-05-054-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `neg` test was already working since `SerialVersionUID` was changed to a `ClassFileAnnotation`; the `run` test only started working since the recently preceding commit that made a compensatory test in the backend.
| | | * | | | | | | SI-8549 Enforce serialization stability for selected collectionsJason Zaugg2014-05-053-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To date, we've been hesidant to offer any guarantees about Java serialization of standard library types among heteregenous Scala versions. Nonetheless, we have added `SerialVersionUID` annotations to parts of the standard library, to offer some stability. This protects against two winds of change: automatic calculation of this UID might differ between JVM versions, or it might differ due to otherwise immaterial changes to the library in Scala releases. With this commit, we strengthen the guarantees. Classes marked with `SerialVersionUID` will be serialization compatible within minor releases of Scala. This is backed up by the enclosed test. After major releases, we reserve the right to break this. But the test will serve to avoid *accidental* changes. Specifically, the test case checks: - deserialize(serialize(x)) == x - serialize(x) is stable over time I have included values of all types marked with `@SerialVersionUID` in the library. For some types, I've added variations in the values to exercise different subclasses, such as `Set1` / `Set2`. This found that that the serialized form of predefined `ClassTags` included the cached identity hash code and failed the stability test. This wasn't an issue for correctness as they also provide `readResolve`, but I marked those fields as `@transient` in any case to comply with the test expectations. That whole area is good example of a serialization worst-practice: using anonymous classes in code like: val Object: Manifest[java.lang.Object] = new PhantomManifest[...](...) { private def readResolve(): Any = Manifest.AnyVal } ... will lead to instability if these declarations are shifted around in the file. Named classes would be preferred. I've noted this in a TODO comment for 2.12.
| | | * | | | | | | SI-8549 Honour the @SerialVersionUID annotatationJason Zaugg2014-05-053-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PR #1673 / 4267444, the annotation `SerialVersionId` was changed from a `StaticAnnotation` to `ClassFileAnnotation` in order to avoid silently ignoring non-literal UIDs like: @SerialVersionUID(0 - 12345L) class C And to flag non-constant UIDs: @SerialVersionUID("!!!".length) While this indeed was fold constants, the change was incomplete. The compiler API for reading the argument from a `ClassFileAnnoation` is different, on must look for a `LiteralAnnotArg`, rather than a `Literal`. This commit: - amends the backend accordingly - removes relevant duplication between `GenASM` and `GenBCode` - tests that the static field is generated accordingly This will mean that we will break deserialization of objects from Scalal 2.11.0 that use this annotation.
| | * | | | | | | | Merge pull request #3703 from huitseeker/issue/SI-8537Jason Zaugg2014-05-073-1/+16
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-8537 Puts SI-8157 fix under Xsource
| | | * | | | | | | | SI-8537 Puts SI-8157 fix under XsourceFrançois Garillot2014-04-253-1/+16
| | | | | | | | | | |
| | * | | | | | | | | Merge pull request #3576 from som-snytt/issue/8325Jason Zaugg2014-05-078-9/+81
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | SI-8325 Accept infix star type outside patterns
| | | * | | | | | | | | SI-8325 Accept infix star type outside patternsSom Snytt2014-05-058-9/+81
| | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to SI-5702 which enabled use of `*` in infix notation in patterns. Most of the work is in distinguishing infix from a sequence pattern. Also, do not take backticked star as the repeated parameter marker in postfix position. That is, `Int``*``` is not `Int*` -- I hope double-tick renders as tick. There is not a special use case except that backticks mean "I am an identifier, as is, and not a keyword."
* | | | | | | | | | | Merge pull request #3726 from lrytz/unreachableLukas Rytz2014-05-081-0/+1
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | | Disable 'unreachable' test for GenBCode
| * | | | | | | | | | Disable 'unreachable' test for GenBCodeLukas Rytz2014-05-081-0/+1
| | |_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GenICode has some logic to eliminate some dead code directly at code gen (introduced in b50a0d811f for SI-7006). This has not been ported over to GenBCode. GenBCode with the new optimizer (in Miguel's branch) also eliminates such dead code. Before adding such functionality to GenBCode I'd like to investigate the cost of running DCE. Maybe we can keep the code generator simple. I created SI-8568 to keep track of this.
* | | | | | | | | | Merge pull request #3721 from lrytz/t7852Jason Zaugg2014-05-085-23/+39
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-7852 for GenBCode
| * | | | | | | | | | BCodeICodeCommon through composition rather than inheritanceLukas Rytz2014-05-084-4/+9
| | | | | | | | | | |
| * | | | | | | | | | SI-7852 for GenBCodeLukas Rytz2014-05-075-24/+35
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid null checks for "someLiteral".== and SomeModule.==. This has been implemented in GenICode in #2954. Introduces a trait to share code between GenICode and GenBCode. This is just a start, more such refactorings will come quite certainly.
* | | | | | | | | | Merge pull request #3728 from retronym/topic/merge-2.10.xJason Zaugg2014-05-0816-12/+168
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Merge 2.10.x to 2.11.x
| * \ \ \ \ \ \ \ \ \ Merge commit 'ec05aeb' into topic/merge-2.10.xJason Zaugg2014-05-0812-8/+99
| |\ \ \ \ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ \ \ Merge pull request #3678 from retronym/ticket/8479Jason Zaugg2014-04-075-4/+49
| | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | SI-8479 Fix constructor default args under scaladoc
| | | * | | | | | | | | | SI-8479 Fix constructor default args under scaladocJason Zaugg2014-04-075-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `DocDef` node hid the `DefDef` constructor from the scrutinee of the namer when determining if the class had constructor defaults or not. The current pattern for fixing these bugs is to delegate the check to `TreeInfo`, and account for the wrapper `DocDef` node. I've followed that pattern, but expressed my feelings about this approach in a TODO comment. Before this patch, the enclosed test failed with: error: not enough arguments for constructor SparkContext: (master: String, appName: String)SparkContext