summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* init currentTyperRun rather than leaving it nul...Eugene Vigdorchik2010-10-041-2/+2
| | | | | init currentTyperRun rather than leaving it null.Typo. review by odersky
* Pattern matching on Array types, working for re...Paul Phillips2010-10-041-22/+43
| | | | | | | | | | | | | | | | | Pattern matching on Array types, working for reals. def f[T](a: Array[T]) = a match { case x: Array[Int] => x(0) case x: Array[Double] => 2 // etc. } I'd also like to thank "instantiateTypeVar" for displacing the mechanical spiders and giant squid beings which used to fill my nightmares. Now that I know true horror, I welcome the squid. Closes #2755, review by odersky.
* Authors taglet is back to docs.Pedro Furlanetto2010-10-041-0/+8
|
* Work on the pattern matcher.Paul Phillips2010-10-0313-112/+53
| | | | | | | | | | | | | | | | | | | | | | | | patches for #3887 and #3888, but I determined that I could achieve the same effect by deleting a bunch of code, so I did. This left only a few lines in TransMatch, so I eliminated it, which led me to remember that many places still reference non-existent phase transmatch, so those were updated. Notes: * This swaps equality tests on stable identifier patterns. They have never conformed to the spec (as noted long ago in ticket #785) which says "The pattern matches any value v such that r == v" whereas until now the test being performed was v == r. * An issue was introduced with specialization in that the implementation of "isTupleType" in Definitions relied upon sym == TupleClass(elems.length). This test is untrue for specialized tuples, causing mysterious behavior because only some tuples are specialized. There is now "isTupleTypeOrSubtype" although it seems likely the former implementation is unnecessary. The issue is sidestepped if one uses "getProductArgs" to retrieve the element types because it sifts through the base types for the Product symbol. Closes #3887 and #3888, review by dmharrah.
* Removes a bunch of private functions which are ...Paul Phillips2010-10-0316-94/+1
| | | | | | | | | | | | | | | | | | | Removes a bunch of private functions which are never called. While based on the nature of "private" one can generally feel pretty good that such a thing is safe, there is always a chance the author had some future use in mind. On that note I draw your attention in particular to: (martin) Typers#stabilizedType: it "sounds" important, but most of it has been commented out since 2007 and the little stub part is a never called private. (iulian) SpecializeTypes#makeTypeArguments: similarly sounds like a cornerstone of a transformation until one notices it isn't used. Unused methods are "attractive nuisances" for anyone (like myself) who has to figure out how the compiler works by studying the compiler, for reasons which are no doubt obvious. No review except as noted.
* Another attempt for #1591.Hubert Plociniczak2010-10-0113-59/+118
|
* Still giddy with the thrill of fixing #266, I v...Paul Phillips2010-09-301-2/+6
| | | | | | | | | | | | | | | | Still giddy with the thrill of fixing #266, I vanquish another pattern matcher bug from the dawn of time. If you've always wanted to write code like this: class Bob[K[_]] { def foo(other: Any) = other match { case x: (Bob[X] forSome { type X[_] }) => } } Now is your chance. Closes #1427, review by moors. (Is there a better way to "shake off" the pattern existential?)
* While trying to come to an understanding with #...Paul Phillips2010-09-3015-83/+158
| | | | | | | | | | | | | | | | | | | | | | | While trying to come to an understanding with #3869 I had one of those "what are we doing" moments regarding the reams of output generated under -Ydebug. We have all these places where extra info is logged under -Ydebug -- like "if (debug) log(...)" -- and if you try for those you are also saddled with all these irrelevant places which instead say if (debug) Console.println(...). I changed about every one of them to send it to log() instead. So if you were enjoying that 600 MB of debugging output when you compile "goodbye world", you can have it back and then some with -Ylog:all. Until then, enjoy the calm, quiet competence of the new -Ydebug. Also herein: raised default ANT_OPTS permgen because I can no longer build a dist with the former defaults, and gave some synthetics a better home in StdNames. No review (but if anyone just can't live without some particular piece of output every single time -Ydebug is given, I can put it back.)
* [scaladoc] JavaScript template search uses a st...Gilles Dubochet2010-09-302-41/+103
| | | | | | | [scaladoc] JavaScript template search uses a statically built index to considerably increase performance. Contributed by Kato Kazuyoshi. Review by dubochet.
* Reverted an earlier binary incompatible change ...Martin Odersky2010-09-292-8/+8
| | | | | | | Reverted an earlier binary incompatible change rolled into r23139. Now, the presentation compiler should have no binary incompatibilties with 2.8.0
* Changed Response so that get does what it did b...Martin Odersky2010-09-291-19/+48
| | | | | | Changed Response so that get does what it did before, and get(TIMEOUT) returns provisional results if it can. Review by vigdorchick.
* need an access to compileRunner from Eclipse to...Eugene Vigdorchik2010-09-291-1/+1
| | | | | | | need an access to compileRunner from Eclipse to check the thread I'm called and not post a work request if I'm already in compiler thread. Review by odersky
* Closes #3875. Review by vigdorchick.Martin Odersky2010-09-292-10/+13
|
* Revert changes related to #1591. no review.Hubert Plociniczak2010-09-2910-114/+57
|
* Fixes scaladoc issues with lazy vals.Hubert Plociniczak2010-09-293-6/+22
|
* More beautification of icode checker output.Paul Phillips2010-09-281-14/+22
|
* Modified typekinds to offer a more general lub ...Paul Phillips2010-09-281-43/+42
| | | | | | | | Modified typekinds to offer a more general lub when it encounters interfaces so it does not end up in a disagreement with the jvm. References #3872, but modifying the compiler lubs is not yet done. Review by dragos.
* Integrating feedback from martin and iulian int...Paul Phillips2010-09-285-27/+57
| | | | | | Integrating feedback from martin and iulian into recent patches and prettifying checker output. No review.
* partial revert of r23128 ("see #3859.Adriaan Moors2010-09-282-4/+2
| | | | | no review
* closes #3859.Adriaan Moors2010-09-283-10/+13
| | | | | review by odersky
* closes #3865: scaladoc now prints anonymous typ...Adriaan Moors2010-09-281-3/+9
| | | | | | | | | closes #3865: scaladoc now prints anonymous type functions since they may occur due to normalization of type constructor arguments of inferred types review by dubochet
* Fix and test case for #3855.Paul Phillips2010-09-281-1/+35
| | | | | | | | | | | | | | | | | | | | | | | situations where a mutable var will later be lifted. As a point of interest, this bug reveals itself fairly clearly if you use a build since r23112 and run the checker thusly: scalac -d /tmp -Ycheck-debug -Ycheck:icode -Xprint:icode test/files/run/bug3855.scala It dies with the following explanation: Output changed for Block 3 [S: 2] [P: 1, 4] Exception in thread "main" scala.tools.nsc.backend.icode.CheckerException: Incompatible stacks: TypeStack() and TypeStack(2 elems) { REFERENCE(class IntRef) REFERENCE(class IntRef) } in Test.main at entry to block: 2 And indeed that was the source of the reported verifyerror. Review by i. dragos.
* A little reorganization of some pattern matcher...Paul Phillips2010-09-282-40/+37
| | | | | | | | A little reorganization of some pattern matcher logic. I must have a short memory to even consider touching it, but maybe I'm still infused with the mario invulnerability star one receives after some time spent consulting with martin. No review.
* Refined crash avoidance related to self type te...Paul Phillips2010-09-281-2/+2
| | | | | | | | | | | | | | | Refined crash avoidance related to self type tests in anonymous classes as introduced for #576. Now it really only excludes anonymous classes. Suddenly, this works: override def equals(other: Any) = other match { case _: this.type => true case _ => false } Who will be the first to roll out some reference equality in the this.type style? No review.
* Fixed an ancient crasher in explicitouter invol...Paul Phillips2010-09-282-13/+14
| | | | | | Fixed an ancient crasher in explicitouter involving singleton self-types. Closes #266, review by odersky.
* replaced deprecated method call. review by rytz.Martin Odersky2010-09-281-1/+1
|
* Fixes an infinite loop.Aleksandar Pokopec2010-09-281-0/+4
|
* Bringing the tree and icode checkers back to life.Paul Phillips2010-09-2722-665/+661
| | | | | | | | | | | | | | | | | | | | | | | | build/pack/bin/scalac -d /tmp -Ycheck-debug -Ycheck:all \ src/compiler/scala/tools/nsc/Global.scala That blows up in constructors as most files do, so also try it with -Ycheck:icode to see the pretty icode output (for a little while anyway, after which it will again blow up.) Our work has only just begun! See test/checker-tests/fail*.scala for 11 examples of places where the checker cries foul. Many of them are telling us about real issues and we should listen, but I will need help to figure out which are legitimate and which should be eliminated by altering the checkers. This patch also hacks on some territory the checkers drew me into, especially TypeKinds, where I figured anything which had been commented out since 2005 was fair game. (Optional) review by dragos. (The one place I know I could use a look is in Checkers.scala, because I had to relax some checks and add at least one newer opcode.)
* closes #3873.Adriaan Moors2010-09-271-74/+15
| | | | | review by maier as no good deed goes unpunished
* close #3864.Lukas Rytz2010-09-271-1/+1
|
* Some progress on reviving TreeCheckers, plus a ...Paul Phillips2010-09-248-85/+137
| | | | | | | | Some progress on reviving TreeCheckers, plus a couple bugfixes and better error messages revealed by that progress. Also applied tiny increment in understanding to fixing up TreeDSL some more. The hand of martin guides from above, so no review.
* closes #3808.Adriaan Moors2010-09-243-27/+19
| | | | | | | | moved typing indentation to where it belongs, now inliner shuold be able to do its job in implicits as well no review
* Adds a half second delay before showing tooltips.Pedro Furlanetto2010-09-241-1/+3
|
* closes #3857: retain pre-erasure info in type h...Adriaan Moors2010-09-231-25/+38
| | | | | | | | | closes #3857: retain pre-erasure info in type history after cloning of mixed in members and, specifically for this bug, fields, so that java generic type sigs are more precise. review by DRagos
* closes #3800.Adriaan Moors2010-09-231-4/+4
| | | | | | | | appliedType goes under annotations. removed some dead code in isSubtypeHK0. review by rytz
* AIOOBE in scanner when typing in the end of file.Eugene Vigdorchik2010-09-231-1/+2
|
* InterruptedException while waiting for result s...Eugene Vigdorchik2010-09-231-1/+6
| | | | | | InterruptedException while waiting for result should be ignored. review by odersky
* Rollback MutableSourceFile, the whole idea is b...Eugene Vigdorchik2010-09-231-41/+24
| | | | | Rollback MutableSourceFile, the whole idea is broken
* closes #3792: type equality for singleton types...Adriaan Moors2010-09-221-9/+11
| | | | | | | | | closes #3792: type equality for singleton types did not take type aliases into account while chasing the chain of underlying types (if the underlying type is an alias of a singleton type, it should be followed) review by odersky
* removed deskolemize hack for tcpoly.Adriaan Moors2010-09-223-3/+5
| | | | | | | | initialize the tree's symbol in typedTypeDef to make sure its info is loaded. review by odersky
* A cleanup of the inliner.Paul Phillips2010-09-2221-743/+450
| | | | | | and still came out of the washing machine smiling. Already reviewed by a certain i. dragos so no review.
* Closes #1591.Hubert Plociniczak2010-09-228-52/+89
|
* do not cache lineIndices for MutableSourceFile.Eugene Vigdorchik2010-09-221-2/+6
|
* Scala IDE needs mutable files with changing con...Eugene Vigdorchik2010-09-214-27/+40
| | | | | Scala IDE needs mutable files with changing content. review by odersky
* [scaladoc] Closes #3541.Gilles Dubochet2010-09-211-1/+9
|
* Painstaking elimination of redundant array crea...Paul Phillips2010-09-212-28/+27
| | | | | | | | | Painstaking elimination of redundant array creation code, also eliminating the lingering usage of "wrapArray" which it has long been noted can go away after next newstarr and now perhaps it really can. A very careful patch so I'll say no review, but it's a bit of a sensitive area so feel free to go reviewing anyway.
* Adds links from letters to the reference index ...Pedro Furlanetto2010-09-204-15/+20
| | | | | | | Adds links from letters to the reference index on the upper section of the left frame. Needs some layout/color improvements. Review by dubochet.
* Mostly a setup commit.Paul Phillips2010-09-196-72/+155
| | | | | | | impressively tedious it is to work directly with the AST, so I picked up TreeDSL again and fleshed it out some more. And then I did a once over on SyntheticMethods beating out bits of duplication. No review.
* Removed unnecessary param. Review by milessabin.Martin Odersky2010-09-181-1/+1
|
* added typedLastTree functionality to CompilerCo...Martin Odersky2010-09-184-8/+39
| | | | | | added typedLastTree functionality to CompilerControl. Avoid some "tree not found" errors. Review by milessabin.