summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* typedIdent no longer destroys attachmentsEugene Burmako2012-12-136-1/+24
| | | | | When transforming Idents to qualified Selects, typedIdent used to forget about carrying original attachments to the resulting tree. Not anymore.
* Merge pull request #1722 from vigdorchik/ide.apiAdriaan Moors2012-12-1236-496/+664
|\ | | | | Extract base scaladoc functionality for the IDE.
| * Extract base scaladoc functionality for the IDE.Eugene Vigdorchik2012-12-1236-496/+664
| |
* | Merge pull request #1738 from retronym/topic/dryer-crashesAdriaan Moors2012-12-112-35/+44
|\ \ | | | | | | DRYer crash reports.
| * | DRYer crash reports.Jason Zaugg2012-12-082-35/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add the supplementary message only once per run, so we don't output the same information as we bubble up through a sequence of well-intentioned exception handlers. - In Driver, don't report message of a `FatalException` immediately after reporting the message and stack trace. - Rename `logThrowable` to `reportThrowable`, which is what it actually does. The difference in output is visible: https://gist.github.com/4242138
* | | Merge pull request #1737 from retronym/ticket/6555Adriaan Moors2012-12-115-3/+48
|\ \ \ | | | | | | | | SI-6555 Better parameter name retention
| * | | SI-6555 Better parameter name retentionJason Zaugg2012-12-085-3/+48
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were losing track of parameter names in two places: 1. Uncurry was using fresh names for the apply method parameters during Function expansion. (The parameter names in the tree were actually correct, they just had synthetic symbols with "x$1" etc.) 2. When adding specialized overrides, the parameter names of the overriden method were used, rather than the parameter names from the overriding method in the class to which we are adding methods. The upshot of this is that when you're stopped in the debugger in the body of, say, `(i: Int) => i * i`, you see `v1` rather than `i`. This commit changes Uncurry and SpecializeTypes to remedy this.
* | | Merge pull request #1752 from scalamacros/ticket/5841Adriaan Moors2012-12-1116-55/+203
|\ \ \ | | | | | | | | Ticket/5841
| * | | Cleanups of reifyBoundTerm and reifyBoundTypeAndriy Polishchuk2012-12-111-62/+69
| | | | | | | | | | | | | | | | | | | | | | | | Cases in reifyBoundTerm are merged by constructors; conditions in reifyBoundType are linearized; also, in latter, or-patterns are used to merge some cases; and some minor stuff not worth mentioning.
| * | | SI-5841 reification of renamed importsAndriy Polishchuk2012-12-1116-0/+141
| |/ / | | | | | | | | | | | | | | | Reification of renamed imports is done by catching Selects with name != their tree.symbol.name, replacing this name with tree.symbol.name, and then doing reifyProduct in case of renamed terms and reifyBoundType (inner) in case of renamed types.
* | | Merge pull request #1701 from retronym/ticket/5877Adriaan Moors2012-12-104-3/+50
|\ \ \ | | | | | | | | SI-5877 Support implicit classes in package objects
| * | | SI-5877 Tweak the check for package object owner.Jason Zaugg2012-12-041-3/+4
| | | | | | | | | | | | | | | | | | | | Reuses existing function `isInPackageObject` and reads better.
| * | | SI-5877 Support implicit classes in package objectsJason Zaugg2012-12-043-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This used to crash, as both the package and the package object had the synthetic method in `decls`, and the typer tried to add the tree to both places. Now, synthetics in the package object are excluded from the pacakge itself.
| * | | Adds debug logging for synthetic registration.Jason Zaugg2012-12-041-2/+18
| | | | | | | | | | | | | | | | Investigatory tools for SI-5877
* | | | Merge pull request #1691 from retronym/ticket/6558Adriaan Moors2012-12-105-1/+64
|\ \ \ \ | | | | | | | | | | SI-6558: typecheck lazy annotation info using non-silent context
| * | | | Split test case to workaround incomplete error report.Jason Zaugg2012-12-034-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | Reporting some errors prevents reporting others. This residual issue had been lodged as SI-6758.
| * | | | SI-6558 Expand test case for annotation typosJason Zaugg2012-12-022-5/+26
| | | | |
| * | | | Fixes SI-6558: typecheck lazy annotation info using non-silent context.Hubert Plociniczak2012-12-023-1/+18
| | | | | | | | | | | | | | | | | | | | Make context for typing lazy annotations always non-silent. If lazy annotation info was created in local (silent) context, error could go unnoticed because later they would still use silent typer for typing the annotation.
* | | | | Merge pull request #1744 from retronym/ticket/4922Adriaan Moors2012-12-103-1/+43
|\ \ \ \ \ | | | | | | | | | | | | SI-4922 Show default in Scaladoc for generic methods.
| * | | | | SI-4922 Show default in Scaladoc for generic methods.Jason Zaugg2012-12-103-1/+43
| | |_|/ / | |/| | | | | | | | | | | | | We must account for cloned symbols.
* | | | | Merge pull request #1733 from retronym/ticket/6614Adriaan Moors2012-12-102-0/+19
|\ \ \ \ \ | | | | | | | | | | | | SI-6614 Test case for fixed ArrayStack misconduct.
| * | | | | SI-6614 Test case for fixed ArrayStack misconduct.Jason Zaugg2012-12-082-0/+19
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not sure when it was fixed, but in 2.9.2 things were messed up: scala> (for (i <- 0 to 10) yield { val in = ArrayStack.tabulate(i)(_.toString); (in, (in filter (_ => true)) == in) }).mkString("\n") res14: String = (ArrayStack(),true) (ArrayStack(0),true) (ArrayStack(0, 1),true) (ArrayStack(1, 2, null),false) (ArrayStack(0, 1, 2, 3),true) (ArrayStack(3, 4, null, null, null),false) (ArrayStack(2, 3, 4, 5, null, null),false) (ArrayStack(1, 2, 3, 4, 5, 6, null),false) (ArrayStack(0, 1, 2, 3, 4, 5, 6, 7),true) (ArrayStack(7, 8, null, null, null, null, null, null, null),false) (ArrayStack(6, 7, 8, 9, null, null, null, null, null, null),false)
* | | | | Merge pull request #1732 from retronym/ticket/6690Adriaan Moors2012-12-103-16/+84
|\ \ \ \ \ | | | | | | | | | | | | SI-6690 Release reference to last dequeued element.
| * | | | | Share the empty LinkedList between first0/last0.Jason Zaugg2012-12-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in line with the existing implementation of `MutableList#clear`, and in line with an newly created empty collection.
| * | | | | SI-6690 Release reference to last dequeued element.Jason Zaugg2012-12-083-16/+84
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids leaks in MutableList and its more better known child, mutable.Queue, when the last element is dequeued or when we take the tail of a one element collection. Refactors copy/pasted code between the two implementations of tail.
* | | | | Merge pull request #1729 from JamesIry/SI-5789-2_2.10.xAdriaan Moors2012-12-103-2/+29
|\ \ \ \ \ | | | | | | | | | | | | SI-5789 Removes assertion about implclass flag in Mixin.scala
| * | | | | SI-5789 Use the ReplTest framework in the testJames Iry2012-12-072-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't check for the crashed message, just dump the output from the REPL. Use the ReplTest framework to the make the test clean
| * | | | | SI-5789 Checks in the right version of the testJames Iry2012-12-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my other commit I had a version of the test that didn't actually reproduce the problem because it didn't set the optimize flag
| * | | | | SI-5789 Removes assertion about implclass flag in Mixin.scalaJames Iry2012-12-073-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion that the class being mixed from should be an implclass seems reasonable, but the flag isn't always set. In order to stop the bleeding this fix turns the assertion into a debug warning. Issue SI-6782 will track figuring out the root cause of the missing flag.
* | | | | | Merge pull request #1713 from retronym/ticket/5894Adriaan Moors2012-12-104-155/+116
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5894 Don't emit static forwarders for macros.
| * | | | | | SI-5894 Don't emit static forwarders for macros.Jason Zaugg2012-12-052-1/+18
| | | | | | |
| * | | | | | Remove some low-hanging duplication beween GenJVM / GenASM.Jason Zaugg2012-12-053-155/+99
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring of the the zero-risk variety. The extraction of `ExcludedForwarderFlags` is the motivation here; we'll need that next commit to fix SI-5894.
* | | | | | Merge pull request #1711 from retronym/ticket/1672Adriaan Moors2012-12-105-1/+115
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-1672 Catches are in tail position without finally.
| * | | | | | Addtional test cases for tail calls in catches.Jason Zaugg2012-12-053-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Includes a run test to check bytecode verifies and behaves - Show this isn't possible when try is used as an expression, and a `liftedTree` local method is needed.
| * | | | | | SI-1672 Catches are in tail position without finally.Jason Zaugg2012-12-054-1/+73
| |/ / / / / | | | | | | | | | | | | | | | | | | So we can eliminate tail calls within.
* | | | | | Merge pull request #1705 from paulp/warn-case-collisionAdriaan Moors2012-12-104-1/+30
|\ \ \ \ \ \ | | | | | | | | | | | | | | Warn when generated classfiles differ only in case.
| * | | | | | Warn when generated classfiles differ only in case.Paul Phillips2012-12-054-1/+30
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | We should most likely prohibit it completely, but warning is a start.
* | | | | | Merge pull request #1700 from retronym/ticket/6535Adriaan Moors2012-12-104-2/+27
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6535 Step back from the precipice of a cycle
| * | | | | | SI-6535 Step back from the precipice of a cycleJason Zaugg2012-12-044-2/+27
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding any non-local parent to WrapAsScala will trigger a valid cyclic reference error. By moving the import of `Wrapper._` inside `WrapAsScala` and `WrapAsJava`, it is not in scope when typing the parents of those, and we avoid the cycle. Adds a test case to show the essense of the promiscious mutual imports that triggers this.
* | | | | | Merge pull request #1699 from retronym/ticket/6549Adriaan Moors2012-12-103-3/+56
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6549 Improve escaping in REPL codegen.
| * | | | | | SI-6549 Improve escaping in REPL codegen.Jason Zaugg2012-12-033-3/+56
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Escape the LHS of an assign when printing results - e.g. X("").foo = bar - Escape val names - e.g. val `"` = 0`
* | | | | | Merge pull request #1692 from retronym/ticket/6547-2Adriaan Moors2012-12-103-3/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6547: elide box unbox pair only when primitives match
| * | | | | | SI-6547: elide box unbox pair only when primitives matchMiguel Garcia2012-12-023-3/+10
| | |_|_|/ / | |/| | | |
* | | | | | Merge pull request #1677 from jedesah/RangeAdriaan Moors2012-12-101-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5678 Bad return type for [Use Case] docs in Range
| * | | | | | SI-5678 Bad return type for [Use Case] docs in RangeJean-Remi Desjardins2012-11-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many [Use Case] example in Range such as the one associated to the union method document that the method returns a Range which is just plain false. Example: val ran1 = Range(1,3) val ran2 = Range(54, 57) val result = ran1.union(ran2) // This is a perfectly valid use case yet obviously cannot be represented as a Range
* | | | | | | Merge pull request #1675 from retronym/ticket/6667-2Adriaan Moors2012-12-106-11/+84
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6667 Abort after any ambiguous in-scope implicit
| * | | | | | | SI-6667 Abort after any ambiguous in-scope implicitJason Zaugg2012-11-265-1/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than continuing on to a search of implicits of the expected type. Previously, the companion implicits were searched if the the caller was running the implicit search in silent mode, for example if searching for an implicit parameter in an application which has an expected type. After this commit, the behaviour is consistent, regardless on silent/non-silent typing.
| * | | | | | | Refactor use of SearchFailure in implicits.Jason Zaugg2012-11-222-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces AmbiguousSearchFailure to go with the the existing SearchFailure, and changes predicates to use `SearchResult.{isFailure, isSuccess}`. This doesn't change behaviour; it is a preparatory commit for SI-6667.
* | | | | | | | Merge pull request #1672 from jedesah/RandomAdriaan Moors2012-12-102-1/+16
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-4664 Make scala.util.Random Serializable
| * | | | | | | | SI-4664 [Make scala.util.Random Serializable] Add test caseJean-Remi Desjardins2012-12-041-0/+15
| | | | | | | | |