summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* fixes the typedIdent problem for goodEugene Burmako2012-12-281-3/+3
| | | | | | Previous attachment retaining fix was only working for Idents which get turned into Selects. Now it works for all transformations applied to Idents (e.g. when an ident refers to something within a package obj).
* Merge pull request #1783 from paulp/pr/opt-specializePaul Phillips2012-12-242-12/+12
|\ | | | | Optimization in SpecializeTypes.
| * Optimization in SpecializeTypes.Paul Phillips2012-12-172-12/+12
| | | | | | | | | | Avoid time traveling to find type parameters which will never be there.
* | Merge pull request #1798 from paulp/pr/check-thread-access-masterPaul Phillips2012-12-231-1/+0
|\ \ | | | | | | Remove stray debugging output line.
| * | Remove stray debugging output line.Paul Phillips2012-12-221-1/+0
| | | | | | | | | | | | I finally reached my "CHECK THREAD ACCESS" limit.
* | | Merge pull request #1506 from som-snytt/issue/6446-plugin-descPaul Phillips2012-12-227-106/+148
|\ \ \ | |/ / |/| | PluginComponent contributes description to -Xshow-phases. (Fixes SI-6446)
| * | PluginComponent contributes description to -Xshow-phases.Som Snytt2012-12-187-106/+148
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Global, SubComponent is called a phase descriptor, but it doesn't actually have a description. (Phase itself does.) This fix adds a description to PluginComponent so that plugins can describe what they do in -Xshow-phases. Elliptical descriptions Exploded archives Plugged-in partest Roundup at the Little h!
* | Merge pull request #1769 from soc/SI-6809Adriaan Moors2012-12-201-2/+2
|\ \ | | | | | | SI-6809 Forbids deprecated case class definitions without parameter list
| * | SI-6809 Forbids deprecated case class definitions without parameter listSimon Ochsenreither2012-12-131-2/+2
| | | | | | | | | | | | This has been deprecated since at least 2.7.7, so it should be good to go.
* | | Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.xPaul Phillips2012-12-2037-537/+694
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: (31 commits) Implicit vars should have non-implicit setters. Deprecate `scala.tools.nsc.Phases` because it's dead-code. scaladoc Template: remove duplicate code and several usages of Option.get. adds scala-reflect.jar to MIMA in ant Test showing the absence of a forward reference update mailmap Remove dead code from `Global`. Cleanup MemberLookup. Better explain ambiguous link targets. typedIdent no longer destroys attachments fixes incorrect handling of Annotated in lazy copier simplifies checkBounds Recurse into instantiations when stripping type vars. Extract base scaladoc functionality for the IDE. Expand pattern match position tests. SI-6288 Remedy ill-positioned extractor binding. SI-6288 Fix positioning of label jumps SI-6288 Position argument of unapply Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef SI-6795 Simplify errors related to "abstract override" on type members SI-6795 Adds negative check for "abstract override" on types in traits ... Conflicts: .mailmap src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/ast/DocComments.scala src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala src/compiler/scala/tools/nsc/doc/html/page/Source.scala src/compiler/scala/tools/nsc/doc/html/page/Template.scala src/compiler/scala/tools/nsc/doc/model/LinkTo.scala src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala test/scaladoc/run/links.scala
| * \ \ Merge pull request #1781 from vigdorchik/html_templateAdriaan Moors2012-12-201-70/+69
| |\ \ \ | | | | | | | | | | scaladoc Template: remove duplicate code and several usages of Option.get.
| | * | | scaladoc Template: remove duplicate code and several usages of Option.get.Eugene Vigdorchik2012-12-171-70/+69
| | | | |
| * | | | Merge remote-tracking branch 'origin/2.10.0-wip' into 2.10.0-wip-mergePaul Phillips2012-12-191-5/+5
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Eugene Burmako (1) and others # Via Adriaan Moors (2) and others * origin/2.10.0-wip: Fixing OSGi distribution. Fix for rangepos crasher. SI-6685 fixes error handling in typedApply
| * \ \ \ \ Merge pull request #1778 from JamesIry/p_SI-6795_2.10.xAdriaan Moors2012-12-192-3/+10
| |\ \ \ \ \ | | | | | | | | | | | | | | SI-6795 simplify "abstract override" errors on type members
| | * | | | | SI-6795 Simplify errors related to "abstract override" on type membersJames Iry2012-12-102-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of saying "only allowed on non-type members of traits" use separate errors for "not allowed on types" and "only allowed on members of traits"
| | * | | | | SI-6795 Adds negative check for "abstract override" on types in traitsJames Iry2012-12-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "abstract override" shouldn't was being allowed on types in traits but the result made no sense and the spec says that shouldn't be allowed.
| * | | | | | Merge pull request #1771 from vigdorchik/si_6605Adriaan Moors2012-12-195-46/+56
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Cleanup MemberLookup. Better explain ambiguous link targets.
| | * | | | | | Cleanup MemberLookup. Better explain ambiguous link targets.Eugene Vigdorchik2012-12-135-46/+56
| | | |_|/ / / | | |/| | | |
| * | | | | | Merge pull request #1772 from gkossakowski/global-deadcodeAdriaan Moors2012-12-192-2/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove dead code from `Global`.
| | * | | | | | Deprecate `scala.tools.nsc.Phases` because it's dead-code.Grzegorz Kossakowski2012-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 0a2022c made `scala.tools.nsc.Phases` dead-code. It's not private so it got deprecated instead of being removing right away. Review by @paulp.
| | * | | | | | Remove dead code from `Global`.Grzegorz Kossakowski2012-12-131-2/+0
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is clearly dead-code (`phaseTimings` is not referred anywhere else in `Global.scala`) and it's safe to remove it since `phaseTimings` is private. This dead-code is leftover from 317a1056. Review by @paulp.
| * | | | | | Merge pull request #1709 from retronym/ticket/3995Adriaan Moors2012-12-191-3/+3
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-3995 Exclude companions with an existential prefix.
| | * | | | | | SI-3995 Exclude companions with an existential prefix.Jason Zaugg2012-12-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In `(qual: Q).apply(expr)` where `expr` must be implictily converted to a path dependent type `T` defined in `qual`, we were looking for companion implicits via a path prefixed by an existential skolem `_1`. These aren't much good to us, as when we try to feed them into `mkAttributedQualifer`, a crash rightly ensues. This commit excludes companions prefixed by an existentially bound path.
| * | | | | | | Merge pull request #1707 from retronym/ticket/5390Adriaan Moors2012-12-171-1/+7
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-5390 Detect forward reference of case class apply
| | * | | | | | | SI-5390 Detect forward reference of case class applyJason Zaugg2012-12-041-1/+7
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refchecks performs (among others) two tasks at once: - detecting forward references - translating `qual.Case(...)` to `new qual.Case(...)` As is often the case with such multi-tasking tree traversals, completion of one task precluded the other.
| * | | | | | | 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-141-1/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | typedIdent no longer destroys attachments
| | * | | | | | | typedIdent no longer destroys attachmentsEugene Burmako2012-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-142-4/+9
| |\ \ \ \ \ \ \ \ | | |_|_|/ / / / / | |/| | | | | | | 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-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #1747 from hubertp/2.10.x-issue/6758Adriaan Moors2012-12-121-10/+4
| |\ \ \ \ \ \ \ \ | | |_|/ / / / / / | |/| | | | | | | Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
| | * | | | | | | Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDefHubert Plociniczak2012-12-111-10/+4
| | | |_|/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1225-485/+526
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Extract base scaladoc functionality for the IDE.
| | * | | | | | | Extract base scaladoc functionality for the IDE.Eugene Vigdorchik2012-12-1225-485/+526
| | | | | | | | |
| * | | | | | | | 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 #1768 from paulp/pr/one-way-to-set-typePaul Phillips2012-12-1912-85/+67
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Eliminating var-like setter tpe_= on Tree.
| * | | | | | | | | Eliminating var-like setter tpe_= on Tree.Paul Phillips2012-12-1912-85/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecated tpe_= on Tree, which is redundant with and less useful than setType. To provide a small layer of insulation from the direct nulling out of mutable fields used to signal the typer, added def clearType() which is merely tree.tpe = null but is shamefaced about the null and var-settings parts like a respectable method should be.
* | | | | | | | | | Merge pull request #1784 from paulp/pr/is-name-in-scopePaul Phillips2012-12-191-10/+1
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Integrate isNameInScope in Contexts.