summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Bencharking a larger program with parallel coll...Aleksandar Pokopec2010-12-216-69/+107
| | | | | | | | | Bencharking a larger program with parallel collections. Fixed a couple of bugs in parallel collections. No review.
* Finer conversions for immutable parallel collec...Aleksandar Pokopec2010-12-2114-72/+235
| | | | | | | | | Finer conversions for immutable parallel collections. Added some missing traits. No review.
* I really don't know the proper way to fix it in...Eugene Vigdorchik2010-12-211-1/+8
| | | | | | I really don't know the proper way to fix it in the current setting, so just guarding.
* Quik fixes for - double definitions, - tree not...Martin Odersky2010-12-211-4/+6
| | | | | Quik fixes for - double definitions, - tree not found, - reloadSources
* An Ordering for Seq and all of its descendents.Paul Phillips2010-12-211-0/+15
| | | | | small, very focused taste of Ordering contravariance. No review.
* This commit is about not calling .length or .si...Paul Phillips2010-12-2017-143/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is about not calling .length or .size on Lists. Sometimes it is unavoidable; not often. I created some methods for the compiler which should probably be in the collections, which do things like test if two sequences have the same length in a more efficient manner than calling length on each. Also, wouldn't it be wonderful to have some mechanism for finding these issues in a more automated way. Like say an annotation: LinearSeqLike { @badjuju("Calling length on linear seqs is O(n)") def length: Int = whee } Or since I imagine everyone thinks they're calling length with lists of 2 or 3, an optional runtime check which yelled if it sees you calling length on a 600 element list, or worse: var i = 0 while (i < myList.length) { // you don't want to see what this does f(myList(i)) ; i += 1; } Uniformity of interface without uniformity of behavior leaves us with traps. No review.
* presentation compiler cleanup & rewriteMartin Odersky2010-12-204-166/+174
|
* I'm wandering around trunk looking for slowness.Paul Phillips2010-12-2016-213/+120
| | | | | | | | | | | | | | | | | are constant distractions which I've meant forever to fix anyway, such as the importing of collection.mutable._ (or any other package with lots of reused names.) Why is this relevant to performance? Well, var x = new HashSet[Int] What's that? What does 'x += 1' mean? These are questions we can all live without. There's almost nothing left which references HashSet or HashMap or Stack or other ambiguous classes without a qualifier: I can finish trunk but I can't keep it clean on my own. (Where should I be writing this stuff down, I wonder.) No review.
* Explaining something for the (largeish N)th tim...Paul Phillips2010-12-191-3/+83
| | | | | | | | | | | | | | | | | | | Explaining something for the (largeish N)th time finally awoke me to the fact that software can explain things. I labored a long time over this error message: I'm sure it can still use work (and/or it will drive scalaz users off some kind of cliff) but the simple common case people have so much trouble with is lit up like a christmas tree and for this I will take some bullets. build/pack/bin/scala -e 'class Foo[T] ; Set[Foo[AnyRef]]() + new Foo[String]' :1: error: type mismatch; found : this.Foo[String] required: this.Foo[java.lang.Object] Note: String <: java.lang.Object, but class Foo is invariant in type T. You may wish to define T as +T instead. (SLS 4.5) class Foo[T] ; Set[Foo[AnyRef]]() + new Foo[String] ^ Review by moors.
* Optimization based on profiler data.Paul Phillips2010-12-197-41/+36
| | | | | | into strings for the benefit of log messages which are never going to be printed, that sort of thing. No review.
* One more insomniac try: the fix for -explaintyp...Paul Phillips2010-12-191-5/+7
| | | | | | One more insomniac try: the fix for -explaintypes having gone off the deep end. Review by odersky.
* Reverting the previous patch for output change ...Paul Phillips2010-12-191-7/+5
| | | | | Reverting the previous patch for output change breakage. No review.
* The fix for -explaintypes having gone off the d...Paul Phillips2010-12-191-5/+7
| | | | | | The fix for -explaintypes having gone off the deep end. Perhaps other good may come of it as well. Review by odersky.
* More fixes to avoid the dreaded "NoSymbol does ...Martin Odersky2010-12-183-4/+24
| | | | | | More fixes to avoid the dreaded "NoSymbol does not have owner" problem in names defaults.
* Added some infrastructure for tracking and disp...Paul Phillips2010-12-185-24/+73
| | | | | | | | | | | | | | | | | | | | Added some infrastructure for tracking and displaying information. Used it to generate phase timing tables. Couldn't bring myself to add another option so it's temporarily behind a system property until I sort out the output options. % scalac -Dscala.timings foo.scala // or: ant -Djvm.opts="-Dscala.timings" [...] phase id ms share -------------- -- ---- ----- typer 4 5816 44.94 mixin 20 1220 9.43 specialize 13 1179 9.11 erasure 15 916 7.08 ...etc. No review.
* Application now uses delayedInit.Martin Odersky2010-12-175-73/+79
|
* Temporary fix for #4092. No reviewHubert Plociniczak2010-12-171-2/+7
|
* Fixed compiler crash on malformed source file.Martin Odersky2010-12-171-1/+5
|
* Attempt to fix NoSymbol does not have owner pro...Martin Odersky2010-12-174-8/+13
| | | | | Attempt to fix NoSymbol does not have owner problem in Eclipse.
* Discovered bug in mapConserve introduced in r23...Paul Phillips2010-12-171-3/+1
| | | | | | | | | | Discovered bug in mapConserve introduced in r23038 when a tail recursive version was submitted. I am optimistic this is a player in recent performance degradation based on the timing of the commit and the fact that I was examining mapConserve because of info from my homemade profiler. (But it's late and I only just found it, so I'll be the last to know.) Review by odersky.
* do not add entry in InnerClass attribute if out...michelou2010-12-161-101/+103
| | | | | | | | | | | | | | | | do not add entry in InnerClass attribute if outer name is null (according to comment for outerName method) in order to remove the following warning message reported by the dx tool (Android): warning: Ignoring InnerClasses attribute for an anonymous inner class (test$$anonfun$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class.
* Added more logging to the presentation compiler.Iulian Dragos2010-12-162-1/+23
|
* Removed the 'codeGenerator' field, which was a ...Iulian Dragos2010-12-162-50/+63
| | | | | | | | | | Removed the 'codeGenerator' field, which was a source of leaks. Refactored javaName/javaType and the like. Now javaName does only name mangling, and it is overriden by the BytecodeGenerator to keep track of inner classes. JVMUtils now can be instantited by third party tools like Eclipse and use javaName without polluting the code generator's state. review by extempore.
* Make the ownPhaseCache field a weak reference.Iulian Dragos2010-12-161-5/+11
|
* Added advanceGeneration for memory profiling, a...Iulian Dragos2010-12-164-0/+18
| | | | | | Added advanceGeneration for memory profiling, and resident-mode profile option. review by extempore.
* Stops barking up the wrong tree with -Ywarn-dea...Paul Phillips2010-12-1510-19/+50
| | | | | | | | | | | | | Stops barking up the wrong tree with -Ywarn-dead-code. The origin of its issues was twofold: 1) synchronized acts by-name without being by-name (ticket #4086) 2) warnings are swallowed if context.reportGeneralErrors is false Those two plus a dash of bitrot. In any case it's at its all time happiest now. It found all the dead code related fixes in this commit. Way to go, -Ywarn-dead-code! Review by odersky.
* Fixed various issues with -Ywarn-dead-code.Paul Phillips2010-12-141-3/+6
| | | | | enjoy fewer spurious warnings. Closes #1681, no review.
* Modified TreeMap to return a fresh empty node u...Paul Phillips2010-12-141-0/+1
| | | | | | | Modified TreeMap to return a fresh empty node upon removing the last element rather than the existing one, so old objects don't remain uncollectable forever. No review.
* More repl hardening against its fickle master, ...Paul Phillips2010-12-141-1/+7
| | | | | More repl hardening against its fickle master, Global. No review.
* Enabled delayedInit. Review by extempore.Martin Odersky2010-12-141-10/+13
|
* Preparing to enable delayedInit with new starr.Martin Odersky2010-12-141-18/+100
|
* Closes #4024. No review.Martin Odersky2010-12-141-1/+2
|
* An alteration in jline had hosed the ability to...Paul Phillips2010-12-142-1/+3
| | | | | | An alteration in jline had hosed the ability to resume from ctrl-Z. Fixed it. No review.
* Make the java iterator wrapper linear time.Paul Phillips2010-12-131-11/+13
| | | | | Closes #4077, review by dragos.
* More repl hardening, and a new jline jar which ...Paul Phillips2010-12-132-3/+15
| | | | | | More repl hardening, and a new jline jar which fixes a paste issue on OSX. No review.
* Hardening the repl against my own lack of ept.Paul Phillips2010-12-133-17/+15
|
* Told the boy trying to plug the dike holes that...Paul Phillips2010-12-122-11/+3
| | | | | | | | | | Told the boy trying to plug the dike holes that he can go home. Instead of trying to catch unpositioned EmptyTrees from the XML parser, don't generate them. It's the kind of commit you would tell your grandkids about if your grandkids could sit still for five seconds: fixes bugs by deleting code and eliminates extraneous error messages to boot (see .check diffs.) No review.
* New jline: BSD licensed, based on [ https://git...Paul Phillips2010-12-12103-7213/+7283
| | | | | | | | | | | | | | | | | | | | | | New jline: BSD licensed, based on [ https://github.com/jdillon/jline2 ] with additional code thanks to [ https://github.com/huynhjl/jline2 ]. Replaces lib/jline.jar with build of these sources, and modifies trunk code to work with the new jar. Hopeful improvements including baseline functionality on cygwin and 64bit windows, as well as more accurate line wrapping / cursor positioning on all platforms and ctrl-R history search. For the time being the canonical source repository is this: https://github.com/paulp/jline2 The enclosed sources are a mirror of that repository, and should be treated as read-only in the scala svn repository. No review, codewise, but people are very strongly encouraged to try it out and report any regressions.
* That cunning underscore tricked me into quoting...Paul Phillips2010-12-121-1/+2
| | | | | | That cunning underscore tricked me into quoting it and changing some test output. No review.
* A little more finnesse needed with backquoting.Paul Phillips2010-12-121-11/+15
|
* Finally figured out what needed to happen forPaul Phillips2010-12-124-25/+53
| | | | | | | import scala.`package`.Throwable not to break the repl. Closes #3673, no review.
* Eliminating all possible warnings from trunk.Paul Phillips2010-12-1113-30/+34
| | | | | | | one deprecation, one unchecked, and one "other", each of which volunteers no mechanism for suppression. (It would be nice to change this.) No review.
* Turned an assert/compiler crash into an error m...Paul Phillips2010-12-114-18/+9
| | | | | | | | Turned an assert/compiler crash into an error message. Admittedly the error output is still terrible (the XML positioning looks like it came from an RNG) but more helpful than the crash. Also misc advantage of a handy new method. Closes #4069, no review.
* When was the last time -Xcheckinit was run? It ...Paul Phillips2010-12-112-4/+3
| | | | | | | | | | When was the last time -Xcheckinit was run? It must have been a long time. All these changes are to address bugs revealed by -Xcheckinit, mostly in test cases, some in the compiler. I'm guessing the partest -Xcheckinit runs are hanging the first time they run into a failure, so if it starts "working" again after this commit don't get too confident. No review.
* Eliminated the 10 unchecked warnings emanating ...Paul Phillips2010-12-111-9/+9
| | | | | | Eliminated the 10 unchecked warnings emanating from RedBlack.scala. No review.
* I found myself unable to make the necessary par...Paul Phillips2010-12-094-834/+828
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found myself unable to make the necessary parser improvements for the pattern matcher without breaking it down better. This patch represents a lot of work. Too many booleans were being threaded in an arbitrary way through parse productions, resulting in an abundance of expressions like annotations(true, false) path(false, true) Also there was too much duplication of code, and unnecessary use of mutable state. So here are the main points: * much less code duplication * many listbuffers as arguments eliminated in favor of good old fashioned call a method and use the result * several booleans eliminated in favor of grouping methods by calling context, so the booleans emerge automatically * misc bug fixes, such as the fact that most operators which start with a letter have been getting the highest precedence instead of the lowest. (I can say most because it's definitely true by the numbers: nobody has reported it because a-zA-Z do the right thing, it's _, $, and the entirety of the Unicode letters which were wrong) * sporadically introduced/improved documentation * misc better error messages, like: scala> import scala.{ _, String => Bob } // before <console>:1: error: '}' expected but ',' found. import scala.{ _, String => Bob } // after <console>:1: error: Wildcard import must be in last position import scala.{ _, String => Bob } ^ Anticipating the performance objection, I measured it and the difference is immeasurable. And the usual finish: I can't imagine anyone being interested in or willing to review this, but am all ears if there are counterexamples. Meanwhile, no review.
* closes #4064.Adriaan Moors2010-12-091-2/+2
|
* Minor changes.Aleksandar Pokopec2010-12-091-0/+4
| | | | | No review.
* Made parallel collections serializable.Aleksandar Pokopec2010-12-0914-24/+89
| | | | | No review.
* Array combiners implementation changed from arr...Aleksandar Pokopec2010-12-0917-203/+449
| | | | | | | | | Array combiners implementation changed from array buffers to doubling unrolled buffers to avoid excessive copying. Still evaluating the benefits of this. No review.