summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* A pretty severe bug in the recognition of tail ...Paul Phillips2011-01-105-141/+138
| | | | | | | | | | | | | | | | | | | | A pretty severe bug in the recognition of tail call elimination. It turns out that Tailcalls will perform "partial elimination" in situations such as: @annotation.tailrec final def f(x: Int): Int = f(f(x)) The outer call to f1 becomes a jump, but the inner call remains as it was. I implemented @tailrec under the impression that if the optimization had taken place, it had gone all the way. So this is now fixed with a direct examination of the rewritten tree. While I was in there I threw in some improved error reporting: the error positioning is now on the call which is not in tail position rather than the method declaration. Closes #4135, no review.
* Oops, the implicit not found message was wrong:Paul Phillips2011-01-102-2/+2
| | | | | | | | | | | scala> implicitly[CanBuildFrom[String, Int, List[List[Int]]]] <console>:10: error: Cannot construct a collection of type List[List[Int]] with elements of type Int based on a collection of type List[List[Int]]. implicitly[CanBuildFrom[String, Int, List[List[Int]]]] ^ No review.
* Fixed a mis-deprecation step where remove was r...Paul Phillips2011-01-101-4/+4
| | | | | | | Fixed a mis-deprecation step where remove was replaced with filterNot on a mutable collection. Thanks to richard emberson for finding it. I used what git fu I have searching for others, but no dice. No review.
* Refactored browsing loaders so that they can be...Martin Odersky2011-01-092-89/+112
| | | | | | Refactored browsing loaders so that they can be more easily reused from the builder. Review by plocinik.
* Implemented toplevel browsing in IDE, so that s...Martin Odersky2011-01-094-27/+136
| | | | | | | | | Implemented toplevel browsing in IDE, so that source files newer than their class files are scanned for contained classes and modules. That way, top-level symbols with names different than their enclosing class can still be identified. I believe the same strategy should be used by IDE/sbt builders. Reviw by plocinik
* Closes #4114. No review.Martin Odersky2011-01-091-1/+1
|
* Closes #3984 by the most arduous and indirect r...Paul Phillips2011-01-094-299/+271
| | | | | | | | | | | | Closes #3984 by the most arduous and indirect route imaginable: abstracts the common code out of the TrieIterators in HashMap and HashSet. When I raised this flag to find out if anyone would open fire, all was quiet on the western front. Although I wouldn't want to write code like this as an everyday thing, I think it serves as a nice showcase for some of the abstraction challenges we're up against: performance looks the same and I will never again have to fix the same bug in two places. Review by rompf.
* Brought back and deprecated onlyPresentation to...Paul Phillips2011-01-091-3/+11
| | | | | | | | | Brought back and deprecated onlyPresentation to unbreak sbt. (Another fine reason for us to push all the way to using sbt is that we wouldn't unwittingly break it, as that change and my recent jline changes both did.) Maybe there is a better way to do what's in this one: review by dragos.
* Warded off an NPE (which only arose on erroneou...Paul Phillips2011-01-092-4/+5
| | | | | | Warded off an NPE (which only arose on erroneous code) in the continuations plugin. Closes #4132, no review.
* The ensuring methods should be by-name on the m...Paul Phillips2011-01-091-2/+2
| | | | | | The ensuring methods should be by-name on the message argument like assert, assume, and require. Closes #4129, no review.
* Reverting fix for #4047 until I figure out why ...Hubert Plociniczak2011-01-083-47/+5
| | | | | | Reverting fix for #4047 until I figure out why it is failing on chara and not on my machine. No review.
* Untangling parsers from compilation units so th...Martin Odersky2011-01-083-38/+87
| | | | | | Untangling parsers from compilation units so that we can browse toplevel symbols without full compilations.
* Applying some short-term balm to scaladoc since...Paul Phillips2011-01-081-13/+14
| | | | | | Applying some short-term balm to scaladoc since it got all loopy after that last patch. No review.
* Override checks and self-types still needed som...Paul Phillips2011-01-086-4/+24
| | | | | | | | | Override checks and self-types still needed some work (ticket #2808.) I believe this is the right change. The modifications in parallel and actors were a result of the files failing to compile after the change to allOverriddenSymbols. (I am taking the position that that aspect is a feature.) Review by malayeri, odersky.
* Great moments in code reuse:Paul Phillips2011-01-0716-87/+70
| | | | | | | | | | | | | | | | | | | | | | def isRootOrEmptyPackageClass(s: Symbol) = s.isRoot || s.isEmptyPackageClass def isRootOrEmpty = (this == EmptyPackageClass) || (this == RootClass) def isEffectiveRoot = isRoot || isEmptyPackageClass // last one actually not quite identical def isUnqualified(n: Name) = n match { case nme.ROOT | nme.EMPTY_PACKAGE_NAME => true ; case _ => false } I was responsible for at least half of these. Now it's only isEffectiveRoot. Also, I have always found it warty that we have to specify Nothing and Any as upper bounds. I gave the TypeBounds companion object a few obvious methods: def empty: TypeBounds = apply(NothingClass.tpe, AnyClass.tpe) def upper(hi: Type): TypeBounds = apply(NothingClass.tpe, hi) def lower(lo: Type): TypeBounds = apply(lo, AnyClass.tpe) It's a lovable patch. No review.
* Made NamesDefault more robust to support idempo...Martin Odersky2011-01-073-6/+23
| | | | | Made NamesDefault more robust to support idempotent compilation.
* Added test for #4072. no reviewHubert Plociniczak2011-01-072-0/+14
|
* Deprecate Cell.Hubert Plociniczak2011-01-071-0/+1
|
* Closes #4047. Review by oderskyHubert Plociniczak2011-01-073-5/+47
|
* Closes #4072.Hubert Plociniczak2011-01-074-26/+62
|
* re-added @SerialVersionUID(0) to anonymous func...Lukas Rytz2011-01-072-3/+4
| | | | | re-added @SerialVersionUID(0) to anonymous function classes.
* moved debug println under if(settings.debug.val...Martin Odersky2011-01-071-0/+1
| | | | | moved debug println under if(settings.debug.value) condition.
* Missing file from last commit.Martin Odersky2011-01-071-1/+5
|
* Documented Picklers.Martin Odersky2011-01-074-83/+319
|
* Test case change.Aleksandar Pokopec2011-01-072-2/+2
| | | | | No review
* Implemented a (slower) workaround for parallel ...Aleksandar Pokopec2011-01-0723-130/+573
| | | | | | | | Implemented a (slower) workaround for parallel vectors. Implemented group by. No review.
* Changed foreach to pforeach.Aleksandar Pokopec2011-01-077-16/+23
| | | | | No review.
* Apparently my flailing attempts to make things ...Paul Phillips2011-01-074-245/+283
| | | | | | | | | | | | | | | | | Apparently my flailing attempts to make things faster earned me the pity of Tiark, who sent this monster patch which he probably dashed off before the appetizers had been cleared away. All the steak is his but I threw in a little sizzle so I could feel like a part of things. It knocks about a bazillion miniseconds off the time spent in implicit search. This is the same patch martin already endorsed, give or take several hundred lines of diff, so I will say no review, even though I know it will be hard to look away. I trimmed most of the "speculative code" (that is, the commented out bits) because it's getting awfully busy along those sidelines. I will preserve the ideas in some more structured form.
* The shutdown hook installed by jline has made l...Paul Phillips2011-01-065-25/+48
| | | | | | | | | | | The shutdown hook installed by jline has made life difficult for sbt for a while. This changes jline not to install it, and alters the scala startup script to trap exit and re-enable echo on recognizably unix platforms. In addition it no longer installs a shutdown hook to flush the repl history to disk, instead flushing after every line. Any bash reviewers out there? Unless someone raises a hand, no review.
* One reversal wrt Pauls TypeRef -> typeRef changes.Martin Odersky2011-01-061-1/+4
|
* Replay now enabled for presentation compiler.Martin Odersky2011-01-0610-907/+666
|
* I took the following comments at their word:Paul Phillips2011-01-067-31/+29
| | | | | | | | | | | | | | // Cannot be created directly; one should always use `singleType' // for creation. Cannot be created directly; one should always use // `refinedType' for creation. Cannot be created directly; one should // always use `typeRef' for creation. (@M: Otherwise hashing breaks) This involved altering about 15 locations. If there was a rhyme or a reason as to why those particular places were entitled to ignore the "always" dictate, I trust it will emerge from some corner now. Until then, it's nice to see some code following its official marching orders. Review by odersky.
* Renamed the files whose names have fallen out o...Paul Phillips2011-01-063-0/+0
| | | | | | | Renamed the files whose names have fallen out of sync with their contents thereby consigning us to ant's version of groundhog day. No review.
* Avoids the creation of an amazing 106,700,793 e...Paul Phillips2011-01-052-14/+33
| | | | | | | | | | | | | Avoids the creation of an amazing 106,700,793 empty arrays (I counted on my fingers) during the compilation of quick.lib and quick.comp by reusing an empty Array[Object]. (And another ten million or so after quick.comp, but who is counting.) It sounds like it would make a bigger difference than it does. Also eliminated some strange indirection from WrappedArray to LowPriorityImplicits back to WrappedArray on each creation. Review by dragos.
* De-finalized equals/hashCode on Trees so people...Paul Phillips2011-01-051-2/+2
| | | | | | | De-finalized equals/hashCode on Trees so people ill-advisedly creating custom Trees with non-reference equality can continue doing their ill-advised thing. No review.
* Fixed a bad interaction between overloading, de...Iulian Dragos2011-01-053-3/+30
| | | | | | Fixed a bad interaction between overloading, default parameters and specialization. Closes #3896, no review.
* closes #4044.Adriaan Moors2011-01-053-1/+33
|
* Eliminated 16 avoidable closure objects in Stream.Paul Phillips2011-01-044-46/+40
|
* Disentangled scaladoc and the presentation comp...Iulian Dragos2011-01-048-15/+14
| | | | | | | | | | | Disentangled scaladoc and the presentation compiler. Now there are different flags, forInteractive and forScaladoc, instead of the overloaded onlyPresentation. While it is unfortunate to have these flags, I know of no easy way to customize the typer (the behavior they control is pretty deep into the analyzer). This shaves off around 100MB of unnecessary docComments from the presentation compiler. review by odersky, dubochet.
* Towards a replay framework for the presentation...Martin Odersky2011-01-049-58/+1110
| | | | | Towards a replay framework for the presentation compiler
* Closes #3869. no review.Iulian Dragos2011-01-042-1/+15
|
* One more try with the lazy clearing.Eugene Vigdorchik2011-01-041-3/+5
|
* Closes #3687, #3719, #3950, #3616.Hubert Plociniczak2011-01-047-78/+83
|
* Fixed infinite loop on call to super from a spe...Iulian Dragos2011-01-043-1/+71
| | | | | | | Fixed infinite loop on call to super from a specialized method. This happened only on illegal specialized inheritance. Closes #3651, no review.
* Protected protected constructors.Paul Phillips2011-01-043-1/+47
| | | | | | since r19547, which was for #1836 but loosened the noose too much. Closes #4128, review by odersky.
* Added some more debugging tools for printing ty...Paul Phillips2011-01-044-30/+83
| | | | | | Added some more debugging tools for printing types. Squirrelled it away in a type debugging trait. No review.
* Some profiler changes.Paul Phillips2011-01-0410-47/+160
| | | | | | | | | | | after each phase, so all the allocations are partitionable by phase in the profiler. I also changed the name of -Yprofile-resident to -Yprofile-memory and had it snapshot after the run instead of between them, so it is usable for regular scalac usage as well. Added tools/profile_scalac which can be used as a drop-in replacement which handles some tedious setup. Review by dragos.
* Modified generic companion apply to call empty ...Paul Phillips2011-01-044-7/+15
| | | | | | | | Modified generic companion apply to call empty if there are no arguments, so something like Set() does not generate unnecessary garbage. Also found some immutable classes which don't reuse an empty object for emptiness, and gave them one. No review.
* Misc icode cleanup. No review.Paul Phillips2011-01-043-25/+21
|
* Temp rollback.Eugene Vigdorchik2011-01-031-4/+2
|