summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Backport of SI-6846.Jason Zaugg2013-01-086-160/+92
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 55806cc0e6177820c12a35a18b4f2a12dc07bb39 Author: Paul Phillips <paulp@improving.org> Date: Wed Dec 19 07:32:19 2012 -0800 SI-6846, regression in type constructor inference. In 658ba1b4e6 some inference was gained and some was lost. In this commit we regain what was lost and gain even more. Dealiasing and widening should be fully handled now, as illustrated by the test case. (cherry picked from commit dbebcd509e4013ce02655a2687b27d0967b3650e) commit e6ef58447d0f4ef6de956fcc03ee283bb9028c02 Author: Paul Phillips <paulp@improving.org> Date: Fri Dec 21 15:11:29 2012 -0800 Cleaning up type alias usage. I determined that many if not most of the calls to .normalize have no intent beyond dealiasing the type. In light of this I went call site to call site knocking on doors and asking why exactly they were calling any of .normalize .widen.normalize .normalize.widen and if I didn't like their answers they found themselves introduced to 'dropAliasesAndSingleTypes', the recursive widener and dealiaser which I concluded is necessary after all. Discovered that the object called 'deAlias' actually depends upon calling 'normalize', not 'dealias'. Decided this was sufficient cause to rename it to 'normalizeAliases'. Created dealiasWiden and dealiasWidenChain. Dropped dropAliasesAndSingleTypes in favor of methods on Type alongside dealias and widen (Type#dealiasWiden). These should reduce the number of "hey, the type alias doesn't work" bugs. (cherry picked from commit 3bf51189f979eb0dd41744ca844fd12dfdaa0dee) Conflicts: src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala commit c1d8803cea1523f458730103386d8e14324a9446 Author: Paul Phillips <paulp@improving.org> Date: Sat Dec 22 08:13:48 2012 -0800 Shored up a hidden dealiasing dependency. Like the comment says: // This way typedNew always returns a dealiased type. This // used to happen by accident for instantiations without type // arguments due to ad hoc code in typedTypeConstructor, and // annotations depended on it (to the extent that they worked, // which they did not when given a parameterized type alias // which dealiased to an annotation.) typedTypeConstructor // dealiases nothing now, but it makes sense for a "new" to // always be given a dealiased type. PS: Simply running the test suite is becoming more difficult all the time. Running "ant test" includes time consuming activities of niche interest such as all the osgi tests, but test.suite manages to miss the continuations tests. (cherry picked from commit 422f461578ae0547181afe6d2c0c52ea1071d37b) commit da4748502792b260161baa10939554564c488051 Author: Paul Phillips <paulp@improving.org> Date: Fri Dec 21 12:39:02 2012 -0800 Fix and simplify typedTypeConstructor. Investigating the useful output of devWarning (-Xdev people, it's good for you) led back to this comment: "normalize to get rid of type aliases" You may know that this is not all the normalizing does. Normalizing also turns TypeRefs with unapplied arguments (type constructors) into PolyTypes. That means that when typedParentType would call typedTypeConstructor it would find its parent had morphed into a PolyType. Not that it noticed; it would blithely continue and unwittingly discard the type arguments by way of appliedType (which smoothly logged the incident, thank you appliedType.) The simplification of typedTypeConstructor: There was a whole complicated special treatment of AnyRef here which appears to have become unnecessary. Removed special treatment and lit a candle for regularity. Updated lots of tests regarding newly not-so-special AnyRef. (cherry picked from commit 394cc426c1ff1da53146679b4e2995ece52a133e) commit 1f3c77bacb2fbb3ba9e4ad0a8a733e0f9263b234 Author: Paul Phillips <paulp@improving.org> Date: Fri Dec 21 15:06:10 2012 -0800 Removed dead implementation. Another "attractive nuisance" burning off time until I realized it was commented out. (cherry picked from commit ed40f5cbdf35d09b02898e9c0950b9bd34c1f858)
* | | | | Merge pull request #1853 from paulp/issue/6928Paul Phillips2013-01-111-44/+47
|\ \ \ \ \ | | | | | | | | | | | | SI-6928, VerifyError with self reference to super.
| * | | | | SI-6928, VerifyError with self reference to super.Paul Phillips2013-01-071-44/+47
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bug in typers mishandled varargs. We should get more aggressive about eliminating all the ad hoc parameter/argument handling code spread everywhere. For varargs especially: any code which tries to make an adjustment based on a repeated parameter is more likely to be wrong than right. In aggregate these reinventions are a huge source of bugs.
* | | | | Merge pull request #1863 from retronym/ticket/6641-2.10.xPaul Phillips2013-01-112-22/+4
|\ \ \ \ \ | |_|_|/ / |/| | | | SI-6641 Deprecate SwingWorker
| * | | | SI-6641 Deprecate SwingWorkerJason Zaugg2013-01-082-22/+4
| | |/ / | |/| | | | | | | | | | See discussion: https://github.com/scala/scala/pull/1862
* | | | Merge pull request #1787 from vigdorchik/si_6803Adriaan Moors2013-01-082-10/+14
|\ \ \ \ | |/ / / |/| | | SI-6803: do not use java.net.URI, even more so incorrectly.
| * | | SI-6803: do not use java.net.URI, even more so incorrectly.Eugene Vigdorchik2013-01-062-10/+14
| | | |
* | | | Merge pull request #1843 from JamesIry/SI-6915_2.10.xAdriaan Moors2013-01-071-1/+1
|\ \ \ \ | |_|/ / |/| | | SI-6915 Updates copyright properties to 2002-2013
| * | | SI-6915 Updates copyright properties to 2002-2013James Iry2013-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .scala header files had the right copyright dates but properties used to generate the information in e.g. "scala -version" hadn't been updated. review @adriaanm
* | | | Merge pull request #1842 from adriaanm/backport-1821Paul Phillips2013-01-062-1/+6
|\ \ \ \ | | | | | | | | | | Backport 1821
| * | | | avoid reflect overhead of certain array instantiationsAdriaan Moors2013-01-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the manifests for Any, Object/AnyRef, AnyVal, Null and Nothing now have their `newArray` methods overridden to avoid reflective overhead of array instantiation. (backport of 45ef0514e, part 2)
| * | | | proper elementClass for WrappedArrayAdriaan Moors2013-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | (backport of 45ef0514e, part 1)
* | | | | Merge pull request #1834 from paulp/issue/6897Paul Phillips2013-01-061-1/+4
|\ \ \ \ \ | | | | | | | | | | | | SI-6897, lubs and varargs star.
| * | | | | SI-6897, lubs and varargs star.Paul Phillips2012-12-311-1/+4
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Don't allow lubs to calculate refinement types which contain a varargs star outside of legal varargs star position.
* | | | | Merge pull request #1835 from paulp/issue/6896Paul Phillips2013-01-061-11/+13
|\ \ \ \ \ | | | | | | | | | | | | SI-6896, spurious warning with overloaded main.
| * | | | | SI-6896, spurious warning with overloaded main.Paul Phillips2012-12-311-11/+13
| |/ / / / | | | | | | | | | | | | | | | | | | | | Make sure there's no legit main signature before issuing any warnings about missing main methods.
* | | | | Merge pull request #1840 from paulp/issue/6911Paul Phillips2013-01-061-4/+16
|\ \ \ \ \ | | | | | | | | | | | | SI-6911, regression in generated case class equality.
| * | | | | SI-6911, regression in generated case class equality.Paul Phillips2013-01-031-4/+16
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caught out by the different semantics of isInstanceOf and pattern matching. trait K { case class CC(name: String) } object Foo extends K object Bar extends K Foo.CC("a") == Bar.CC("a") That expression is supposed to be false, and with this commit it is once again.
* | | | | Merge pull request #1841 from adriaanm/rebase-6827-2.10.xAdriaan Moors2013-01-041-2/+3
|\ \ \ \ \ | |_|_|/ / |/| | | | Fix Iterator#copyToArray (fixes SI-6827).
| * | | | Fix Iterator#copyToArray (fixes SI-6827).Erik Osheim2013-01-041-2/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in #scala, when using a non-zero start it's possible to get an ArrayIndexOutOfBoundsException due to an incorrect bounds check. This patch fixes this, as well as another potential bounds error, and adds test cases. Incorporates some other suggestions by Som-Snytt to ensure that callers will get useful error messages in cases where the start parameter is wrong (negative or out-of-array-bounds). Review by @som-snytt.
* | | | Merge pull request #1739 from jedesah/Array_optPaul Phillips2013-01-041-0/+14
|\ \ \ \ | |/ / / |/| | | SI-5017 Poor performance of :+ operator on Arrays
| * | | SI-5017 Poor performance of :+ operator on ArraysJean-Remi Desjardins2012-12-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Control performance of :+ and +: operator on my machine were 700-800 ms After adding size hint on the implementation in SeqLike, it went down to 500-600 ms But with specialixed implementation in ArrayOps, brings it down to 300-400 ms Unfortunatly, this method will only be called when the Array object is being referenced directly as it's type, but that should be the case enough times to justify the extra method. I ended up removing the sizeHint in SeqLike because it made the execution of the "benchmark" slower when the Array was being manipulated as a Seq. Side note: Interestingly enough, the benchmark performed better on my virtualized Fedora 17 with JDK 7 than natively on Mac OS X with JDK 6
* | | | Merge pull request #1822 from paulp/issue/6194Paul Phillips2013-01-031-2/+6
|\ \ \ \ | |_|/ / |/| | | SI-6194, repl crash.
| * | | SI-6194, repl crash.Paul Phillips2012-12-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Always a bad idea to use replaceAll on unknown strings, as we saw here when windows classpaths arrived containing escape-requiring backslashes.
* | | | Merge pull request #1824 from paulp/pr/partest-likes-deprecationPaul Phillips2012-12-312-2/+1
|\ \ \ \ | | | | | | | | | | Remove -deprecation from partest default options.
| * | | | Remove -deprecation from partest default options.Paul Phillips2012-12-272-2/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Who knows why it was ever like this; it's not like anyone sees the deprecation warnings. In PR #1807 there is now a test which depends on partest not making this move, so it's a good time to finally expunge it.
* | | | Merge pull request #1792 from ybr/minordocimprovementPaul Phillips2012-12-281-1/+1
|\ \ \ \ | | | | | | | | | | Stream.zip naturalsEx example does not compile => remove extra zip call
| * | | | Stream.zip naturalsEx example does not compile => remove extra zip callybr2012-12-201-1/+1
| | | | |
* | | | | LinearSeq lengthCompare without an iterator.Paul Phillips2012-12-281-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Had to fix up an iffy test: not only was it testing undefined behavior, it demanded just the right numbers be printed in a context where all negative or positive numbers are equivalent. It's the ol' "get them coming and going" trick.
* | | | | SI-6415, overly eager evaluation in Stream.Jean-Remi Desjardins2012-12-282-13/+23
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | The lengthCompare method in LinearSeqOptimized was looking one step further than it needed to in order to give the correct result, which was creating some unwanted side effects related to Streams.
* | | | SI-6829, SI-6788, NPEs during erroneous compilation.Paul Phillips2012-12-241-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Have to intercept trees which have a null type due to errors before they leave the warm confines of 'def typed' because from that point everything assumes tree.tpe != null.
* | | | Remove stray debugging output line.Paul Phillips2012-12-221-1/+0
| | | | | | | | | | | | | | | | I finally reached my "CHECK THREAD ACCESS" limit.
* | | | Merge pull request #1687 from scalamacros/topic/unchecked-pattern-matchPaul Phillips2012-12-201-1/+5
|\ \ \ \ | | | | | | | | | | fixes the unchecked warning in quick.comp
| * | | | SI-6338 fixes the unchecked warning in quick.compEugene Burmako2012-12-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | All those months when I thought it was yet another spurious error in the new pattern matcher...
* | | | | 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 pull request #1790 from paulp/2.10.0-wip-mergeAdriaan Moors2012-12-201-5/+5
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Merge 2.10.0-wip into 2.10.x
| * | | | | 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
| | * | | | | Fix for rangepos crasher.Paul Phillips2012-12-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapClassTagUnapply was generating an unpositioned tree which would crash under -Yrangepos. See SI-6338.
| | * | | | | SI-6685 fixes error handling in typedApplyEugene Burmako2012-11-301-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MissingClassTagError doesn't lead to an exception, but rather silently sets an error, we need to bubble the resulting erroneous tree up the responsibility chain instead of mindlessly typechecking this again. This wasn't an issue before, because as far as I can guess the aforementioned error setter was always throwing exceptions in the most common usage scenarios (therefore the typecheck-again-fail-again vicious loop wasn't triggered).
* | | | | | | Merge pull request #1788 from retronym/ticket/6848Paul Phillips2012-12-201-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Implicit vars should have non-implicit setters.
| * | | | | | Implicit vars should have non-implicit setters.Jason Zaugg2012-12-191-1/+1
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise they trigger spurious feature warnings. scala> trait T { implicit var a: Any } <console>:7: warning: implicit conversion method a_= should be enabled by making the implicit value language.implicitConversions visible.
* | | | | | 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.