summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | SI-4664 Make scala.util.Random SerializableJean-Remi Desjardins2012-12-011-1/+1
| | |_|/ / / / / | |/| | | | | |
* | | | | | | | Merge pull request #1670 from paulp/issue/6712Adriaan Moors2012-12-102-7/+14
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix for SI-6712, bug in object lifting.
| * | | | | | | | Fix for SI-6712, bug in object lifting.Paul Phillips2012-11-252-7/+14
| | |_|/ / / / / | |/| | | | | |
* | | | | | | | Merge pull request #1650 from jsuereth/wip/add-mima-to-buildAdriaan Moors2012-12-101-1/+35
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | Now the test suite runs MIMA for compatibility testing.
| * | | | | | | Now the test suite runs MIMA for compatibility testing.Josh Suereth2012-12-051-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failures are still not reported, thanks to MIMA not returnign non-0 exit codes on failure. I'll be patching MiMA seprately, but at least this will let us deal with failures in scala. Currently, we need to adapt the Vector speed improvements for binary compatibility.
* | | | | | | | Merge pull request #1668 from scalamacros/topic/pre-typemacrosAdriaan Moors2012-12-0751-353/+616
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | refactors handling of parent types
| * | | | | | | | more ListOfNil => NilEugene Burmako2012-12-064-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even more trees (together with Apply nodes produced by templateParents and New nodes produced by New in TreeBuilders) now distinguish nullary argument list from empty argument list.
| * | | | | | | | DummyTree => CannotHaveAttrsEugene Burmako2012-12-069-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks like a much more specific name than a generic "dummy" prefix. CannotHaveAttrs also doesn't imply that an implementing tree should satisfy some bigger contract. EmptyTree and emptyValDef are very unlike each other, so there's no point in trying to unify them. Also DummyTree.isEmpty is no longer automatically true. The notion of trees not having positions and types by design (i.e. EmptyTree + empty TypeTrees + emptyValDef + the new pendingSuperCall) is quite different from the notion of an empty tree in a sense of a tree being a null object (i.e. EmptyTree + empty TypeTrees).
| * | | | | | | | evicts assert(false) from the compilerEugene Burmako2012-12-0617-24/+29
| | | | | | | | |
| * | | | | | | | introduces global.pendingSuperCallEugene Burmako2012-12-0615-98/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to global.emptyValDef, which is a dummy that stands for an empty self-type, this commit introduces global.pendingSuperCall, which stands for a yet-to-be-filled-in call to a superclass constructor. pendingSuperCall is emitted by Parsers.template, treated specially by Typers.typedParentType and replaced with a real superclass ctor call by Typers.typedTemplate. To avoid copy/paste, this commit also factors out and unifies dumminess of EmptyTree, emptyValDef and pendingSuperCall - they all don't have a position and actively refuse to gain one, same story for tpe.
| * | | | | | | | refactors handling of parent typesEugene Burmako2012-12-0624-216/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment parser does too much w.r.t handling of parent types. It checks whether a parent can have value arguments or not and more importantly, it synthesizes constructors and super calls. This approach is fundamentally incompatible with upcoming type macros. Take for example the following two snippets of code: `class C extends A(2)` `class D extends A(2) with B(3)` In the first snippet, `A` might be a type macro, therefore the super call `A.super(2)` eagerly emitted by the parser might be meaningless. In the second snippet parser will report an error despite that `B` might be a type macro which expands into a trait. Unfortunately we cannot simply augment the parser with the `isTypeMacro` check. This is because to find out whether an identifier refers to a type macro, one needs to perform a typecheck, which the parser cannot do. Therefore we need a deep change in how parent types and constructors are processed by the compiler, which is implemented in this commit.
| * | | | | | | | unifies approaches to call analysis in TreeInfoEugene Burmako2012-12-063-62/+136
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of a flurry of methods such as `methPart` or `typeArguments` to analyze applications, there is a single access point to related info: `treeInfo.dissectApplied(tree)` Dissection returns an instance of the `Applied` class, which can extract parts of applications and perform other application-specific operations, e.g. `applyCount`. For the sake of convenience, there's also an extractor named `Applied`, which extracts `core`, `targs` and `argss`, where core is everything except targs and argss. Extractor works for both `Tree` and `Applied` (in the former case, it's equivalent to first dissecting and pattern matching).
* | | | | | | | Merge pull request #1654 from scalamacros/ticket/6696Adriaan Moors2012-12-0732-51/+115
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-6696 removes "helper" tree factory methods
| * | | | | | | | TypeApply + Select and their type-level twinsEugene Burmako2012-12-061-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documented differences between TypeApply and AppliedTypeTree and between Select and SelectFromTypeTree.
| * | | | | | | | SI-6696 removes "helper" tree factory methodsEugene Burmako2012-12-0632-50/+84
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As experience shows, these methods can easily be a source of confusion for the newcomers: https://issues.scala-lang.org/browse/SI-6696. I'm only leaving the TypeTree(tp) factory, since the facility to set underlying types for type trees is not exposed in the public API, as it's inherently mutable.
* | | | | | | | Merge pull request #1721 from JamesIry/SI-6766_2.10.xAdriaan Moors2012-12-077-0/+44
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | SI-6766 Create a continuations project in eclipse
| * | | | | | | SI-6766 Makes the -Pcontinuations:enable flag a project specific preferenceJames Iry2012-12-062-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the continuations plugin flag specific to the continuations library. Remove the documentation about adding the continuation plugin from the eclipse README.md. One consequence of this change is that if a programmer has prefs for the continuations eclipse project then there will be a merge conflict. That's unavoidable without having a more sophisticated way to build the eclipse projects.
| * | | | | | | SI-6766 Create a continuations project in eclipseJames Iry2012-12-067-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're missing a continuations dependency when we try to build reflect in eclipse which causes things to die horribly. This commit adds an eclipse project for the library portion of continuations, makes projects that depend on the scala-library also depend on continuations-library, and adds another bullet to the eclipse readme to turn on the continuations plugin.
* | | | | | | | Merge pull request #1690 from retronym/ticket/6631Adriaan Moors2012-12-062-6/+25
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-6631 Handle invalid escapes in string interpolators
| * | | | | | | | Fix Scaladoc for the raw interpolator.Jason Zaugg2012-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The comment about unicode escaping fell into the very same trap that it was warning about.
| * | | | | | | | SI-6631 Handle invalid escapes in string interpolatorsJason Zaugg2012-12-022-4/+23
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | Patch contributed by Rex Kerr.
* | | | | | | | Merge pull request #1680 from jedesah/Seq_docAdriaan Moors2012-12-061-1/+1
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Fix typo in documentation for Seq
| * | | | | | | Fix typo in documentation for SeqJean-Remi Desjardins2012-11-271-1/+1
| | |_|/ / / / | |/| | | | |
* | | | | | | Merge pull request #1702 from scalamacros/topic/idempotencyEugene Burmako2012-12-0512-0/+241
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | tests for idempotency issues in the typechecker
| * | | | | | tests for idempotency issues in the typecheckerEugene Burmako2012-12-0412-0/+241
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For more details see https://issues.scala-lang.org/browse/SI-5464. Check files are intentionally very precise, so that we can monitor how the situation changes over time.
* | | | | | Merge pull request #1681 from paulp/issue/6731Adriaan Moors2012-12-0510-48/+331
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Fix for SI-6731, dropped trees in selectDynamic.
| * | | | | Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722.Paul Phillips2012-11-297-1/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All tickets involving selectDynamic fixed by the prior commit. It also fixes SI-6663, but that already has a test case.
| * | | | | Fix for SI-6731, dropped trees in selectDynamic.Paul Phillips2012-11-283-47/+221
| | | | | | | | | | | | | | | | | | | | | | | | I rewrote mkInvoke entirely, and boosted the test coverage.
* | | | | | Merge pull request #1682 from paulp/assert-about-qualifierPaul Phillips2012-12-034-7/+20
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Asserts about Tree qualifiers.
| * | | | | Asserts about Tree qualifiers.Paul Phillips2012-11-294-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Encoding recent revelations about certain tree invariants in the form of asserts.
* | | | | | Merge pull request #1678 from martende/ticket/5753Eugene Burmako2012-11-2915-10/+57
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-5753 macros cannot be loaded when inherited from a class or a trait
| * | | | | neg test addedmartende2012-11-276-0/+22
| | | | | |
| * | | | | SI-5753 macros cannot be loaded when inherited from a class or a traitmartende2012-11-279-10/+35
| | |/ / / | |/| | | | | | | | | | | | | | | | | | enclClass should be taken from Tree otherwise we can jump to declaration class/trait.
* | | | | Merge pull request #1676 from retronym/topic/sm-interpolatorPaul Phillips2012-11-2813-55/+148
|\ \ \ \ \ | |_|/ / / |/| | | | Adds a margin stripping string interpolator.
| * | | | Take advantage of the margin stripping interpolator.Jason Zaugg2012-11-269-55/+52
| | | | | | | | | | | | | | | | | | | | Safer and shorter.
| * | | | Adds a margin stripping string interpolator.Jason Zaugg2012-11-264-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently only for compiler internal use. Designed to avoid surprises if the interpolated values themselves contain the margin delimiter. Before: val bip = "\n |.." s"""fooo |bar $bip |baz""".stripMargin "fooo bar .. baz" After: sm"""fooo |bar $bip |baz""" "fooo bar |.. baz"
* | | | | Merge pull request #1674 from scalamacros/topic/showrawJosh Suereth2012-11-272-4/+6
|\ \ \ \ \ | |_|/ / / |/| | | | SI-6718 fixes a volatile test
| * | | | SI-6718 fixes a volatile testEugene Burmako2012-11-262-4/+6
| | | | |
* | | | | Merge pull request #1666 from paulp/issue/6707Adriaan Moors2012-11-252-4/+4
|\ \ \ \ \ | | | | | | | | | | | | Flag pattern matcher synthetics as synthetic.
| * | | | | Mark pattern matcher synthetics as SYNTHETIC.Paul Phillips2012-11-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flagging synthetics accurately is important to allow for useful static analysis.
| * | | | | Set symbol flags at creation.Paul Phillips2012-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All should prefer passing flags at symbol creation to mutating the flags field after creation.
* | | | | | Merge pull request #1665 from paulp/issue/6687Adriaan Moors2012-11-252-1/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix for SI-6687, wrong isVar logic.
| * | | | | | Fix for SI-6687, wrong isVar logic.Paul Phillips2012-11-242-1/+11
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | Fields which back lazy vals need to be excluded via !isLazy lest isVar return true.
* | | | | | Merge pull request #1663 from paulp/merge-2.10.wip-xAdriaan Moors2012-11-2540-141/+410
|\ \ \ \ \ \ | | | | | | | | | | | | | | Merge 2.10.0-wip into 2.10.x.
| * \ \ \ \ \ Merge remote-tracking branch 'origin/2.10.0-wip' into merge-2.10.wip-xPaul Phillips2012-11-2340-141/+410
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Jason Zaugg (8) and others # Via Adriaan Moors (6) and Josh Suereth (5) * origin/2.10.0-wip: Removing controversial `either` method from Futures API. SI-6624 set info of case pattern binder to help find case field accessors Fixes SI-6628, Revert "Fix for view isEmpty." SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise method Fixes SI-6559 - StringContext not using passed in escape function. SI-6648 copyAttrs must preserve TypeTree#wasEmpty Fix raw string interpolator: string parts which were after the first argument were still escaped Update comment. SI-6646 `ident` or Ident is always new binding. SI-6440 Address regressions around MissingRequirementError Refine the message and triggering of MissingRequirementError. SI-6640 Better reporting of deficient classpaths. SI-6644 Account for varargs in extmethod forwarder SI-6646 Fix regression in for desugaring. Update tools/epfl-publish
| | * | | | | Merge pull request #1656 from jsuereth/fix/remove-future-either-methodv2.10.0-RC3Adriaan Moors2012-11-211-23/+0
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Removing controversial `either` method from Futures API.
| | | * | | | | Removing controversial `either` method from Futures API.Josh Suereth2012-11-211-23/+0
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removes `either` from Future * No tests need to change, since this was an untested method.
| | * | | | | Merge pull request #1607 from retronym/ticket/6640Josh Suereth2012-11-1915-53/+200
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | SI-6640 Better reporting of deficient classpaths.
| | | * | | | | SI-6440 Address regressions around MissingRequirementErrorJason Zaugg2012-11-1315-42/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Go back to using globalError to report when a stub's info is referenced, and only throw the MissingRequirementError when compilation really must abort due to having a StubTermSymbol in a place where a StubClassSymbol would have been a better choice. This situation arises when an entire package is missing from the classpath, as was the case in the reported bug. Adds `StoreReporterDirectTest`, which buffers messages issued during compilation for more structured interrogation. Use this in two test for manifests -- these tests were using a crude means of grepping compiler console output to focus on the relevant output, but this approach was insufficient with the new multi-line error message emitted as part of this change. Also used that base test class to add two new tests: one for the reported error (package missing), and another for a simpler error (class missing). The latter test shows how stub symbols allow code to compile if it doesn't the subset of signatures in some type that refer to a missing class. Gave the INFO/WARNING/ERROR members of Reporter sensible toString implementations; they inherit from Enumeration#Value in an unusual manner (why?) that means the built in toString of Enumeration printed `Severity@0`.
| | | * | | | | Refine the message and triggering of MissingRequirementError.Jason Zaugg2012-11-103-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To force a failure of the stub, call a new method `failIfStub` rather than `info`. - Offer a broader range of potential root causes in the error message.