summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1706 from retronym/ticket/5361Adriaan Moors2012-12-151-2/+9
|\ | | | | SI-5361 Avoid cyclic type with malformed refinement
| * SI-5361 Refactor in accordance with review comments.Jason Zaugg2012-12-051-6/+7
| | | | | | | | | | Check for malformed stats in the refinement body in the same place we check for erroneous parents.
| * SI-5361 Avoid cyclic type with malformed refinementJason Zaugg2012-12-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The statement `val x = this` in the refinment type: (new {}): {val x = this} is lazily typechecked, in order to, according to the comment in `typedRefinment, "avoid cyclic reference errors". But the approximate type used ends up with: Refinment@1( parents = [...] decls = { val x: Refinement@1 }) This commit eagerly checks that there is no term definitions in type refinments, rather than delaying this. This changes the error message for SI-3614.
* | Merge pull request #1766 from scalamacros/topic/typed-ident-attachmentsEugene Burmako2012-12-142-1/+2
|\ \ | | | | | | typedIdent no longer destroys attachments
| * | typedIdent no longer destroys attachmentsEugene Burmako2012-12-132-1/+2
| | | | | | | | | | | | | | | When transforming Idents to qualified Selects, typedIdent used to forget about carrying original attachments to the resulting tree. Not anymore.
* | | Merge pull request #1754 from retronym/ticket/6288Adriaan Moors2012-12-143-4/+13
|\ \ \ | | | | | | | | SI-6288 Perfecting positions
| * | | SI-6288 Remedy ill-positioned extractor binding.Jason Zaugg2012-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The call to `Option#get` on the result of the unapply method was unpositioned and ended up with the position of the `match`.
| * | | SI-6288 Fix positioning of label jumpsJason Zaugg2012-12-122-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICode generation was assigning the position of the last label jump to all jumps to that particular label def. This problem is particularly annoying under the new pattern matcher: a breakpoint in the body of the final case will be triggered on the way out of the body of any other case. Thanks to @dragos for the expert guidance as we wended our way through GenICode to the troublesome code. Chalk up another bug for mutability. I believe that the ICode output should be stable enough to use a a .check file, if it proves otherwise we should make it so.
| * | | SI-6288 Position argument of unapplyJason Zaugg2012-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `atPos(pos) { ... }` doesn't descend into children of already positioned trees, we need to manually set the position of `CODE.REF(binder)` to that of the stunt double `Ident(nme.SELECTOR_DUMMY)`.
* | | | Merge pull request #1740 from scalamacros/topic/super-call-argsPaul Phillips2012-12-122-9/+9
|\ \ \ \ | | | | | | | | | | s/SuperCallArgs/SuperArgs/
| * | | | s/SuperCallArgs/SuperArgs/Eugene Burmako2012-12-102-9/+9
| |/ / / | | | | | | | | | | | | | | | | Applies a minor renaming that I failed to thoroughly perform in the last pull request which refactored parent types.
* | | | Merge pull request #1742 from scalamacros/ticket/4044Paul Phillips2012-12-121-16/+16
|\ \ \ \ | | | | | | | | | | prevents spurious kind bound errors
| * | | | simplifies checkBoundsEugene Burmako2012-12-131-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is an isomorphic transformation of checkBounds, which avoids doing any checks altogether if the scrutinee is already erroneous. Inspection of checkKindBounds and isWithinBounds called from checkBounds suggests that they don't perform side effects which can't be omitted.
| * | | | prevents spurious kind bound errorsEugene Burmako2012-12-101-2/+8
| |/ / / | | | | | | | | | | | | | | | | The patch adds a check which makes sure that the trees we're about to report aren't already erroneous.
* | | | Merge pull request #1758 from hubertp/2.10.x-issue/strip-tvarsAdriaan Moors2012-12-121-2/+2
|\ \ \ \ | | | | | | | | | | When we strip tvars we should also recursively strip their instantiation...
| * | | | Recurse into instantiations when stripping type vars.Hubert Plociniczak2012-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This led to the inference of weird types as list of lub base types was empty. This change fixes case x3 in the test case.
* | | | | Merge pull request #1747 from hubertp/2.10.x-issue/6758Adriaan Moors2012-12-122-10/+9
|\ \ \ \ \ | |_|_|/ / |/| | | | Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
| * | | | Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDefHubert Plociniczak2012-12-112-10/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Looks like the change in 25ecde037f22ff no longer forced lazy annotations for some of the cases. Also removed forcing for PackageDef annotations as we currently don't support them.
* | | | Merge pull request #1722 from vigdorchik/ide.apiAdriaan Moors2012-12-1226-486/+527
|\ \ \ \ | | | | | | | | | | Extract base scaladoc functionality for the IDE.
| * | | | Extract base scaladoc functionality for the IDE.Eugene Vigdorchik2012-12-1226-486/+527
| | | | |
* | | | | 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-112-1/+9
|\ \ \ \ \ | | | | | | | | | | | | SI-6555 Better parameter name retention
| * | | | | SI-6555 Better parameter name retentionJason Zaugg2012-12-082-1/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-55/+71
|\ \ \ \ \ | |_|_|/ / |/| | | | 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-112-0/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | 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-102-3/+23
|\ \ \ \ | | | | | | | | | | 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-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-1/+5
|\ \ \ \ | | | | | | | | | | SI-6558: typecheck lazy annotation info using non-silent context
| * | | | Fixes SI-6558: typecheck lazy annotation info using non-silent context.Hubert Plociniczak2012-12-021-1/+5
| | | | | | | | | | | | | | | | | | | | 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-101-1/+10
|\ \ \ \ \ | | | | | | | | | | | | SI-4922 Show default in Scaladoc for generic methods.
| * | | | | SI-4922 Show default in Scaladoc for generic methods.Jason Zaugg2012-12-101-1/+10
| | |_|/ / | |/| | | | | | | | | | | | | We must account for cloned symbols.
* | | | | Merge pull request #1732 from retronym/ticket/6690Adriaan Moors2012-12-102-16/+22
|\ \ \ \ \ | | | | | | | | | | | | 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-082-16/+22
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-2/+1
|\ \ \ \ \ | | | | | | | | | | | | SI-5789 Removes assertion about implclass flag in Mixin.scala
| * | | | | SI-5789 Removes assertion about implclass flag in Mixin.scalaJames Iry2012-12-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-103-155/+99
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5894 Don't emit static forwarders for macros.
| * | | | | | SI-5894 Don't emit static forwarders for macros.Jason Zaugg2012-12-051-1/+1
| | | | | | |
| * | | | | | 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-101-1/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-1672 Catches are in tail position without finally.
| * | | | | | SI-1672 Catches are in tail position without finally.Jason Zaugg2012-12-051-1/+9
| |/ / / / / | | | | | | | | | | | | | | | | | | So we can eliminate tail calls within.
* | | | | | Merge pull request #1705 from paulp/warn-case-collisionAdriaan Moors2012-12-101-1/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | Warn when generated classfiles differ only in case.
| * | | | | | Warn when generated classfiles differ only in case.Paul Phillips2012-12-051-1/+8
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | We should most likely prohibit it completely, but warning is a start.
* | | | | | Merge pull request #1700 from retronym/ticket/6535Adriaan Moors2012-12-102-2/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6535 Step back from the precipice of a cycle
| * | | | | | SI-6535 Step back from the precipice of a cycleJason Zaugg2012-12-042-2/+6
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-3/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6549 Improve escaping in REPL codegen.