| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Bencharking a larger program with parallel collections.
Fixed a couple of bugs in parallel collections.
No review.
|
|
|
|
|
|
|
|
|
| |
Finer conversions for immutable parallel collections.
Added some missing traits.
No review.
|
|
|
|
|
|
| |
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 found, - reloadSources
|
|
|
|
|
| |
small, very focused taste of Ordering contravariance. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
|
| |
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 -explaintypes having gone off the
deep end. Review by odersky.
|
|
|
|
|
| |
Reverting the previous patch for output change breakage. No review.
|
|
|
|
|
|
| |
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 not have owner" problem
in names defaults.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Attempt to fix NoSymbol does not have owner problem in Eclipse.
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Added advanceGeneration for memory profiling, and resident-mode profile
option. review by extempore.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
enjoy fewer spurious warnings. Closes #1681, no review.
|
|
|
|
|
|
|
| |
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, Global. No review.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
An alteration in jline had hosed the ability to resume from ctrl-Z.
Fixed it. No review.
|
|
|
|
|
| |
Closes #4077, review by dragos.
|
|
|
|
|
|
| |
More repl hardening, and a new jline jar which fixes a paste issue on
OSX. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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://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 it and changing some
test output. No review.
|
| |
|
|
|
|
|
|
|
| |
import scala.`package`.Throwable
not to break the repl. Closes #3673, no review.
|
|
|
|
|
|
|
| |
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 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 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 from RedBlack.scala. No
review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
|
| |
Array combiners implementation changed from array buffers to doubling
unrolled buffers to avoid excessive copying. Still evaluating the
benefits of this.
No review.
|