| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Added all the javap command line options to :javap. No review.
|
|
|
|
|
|
|
|
| |
After discovering #3376 was fixed I gave in and tried to write a test.
Now that the fiddling is over you can write repl tests without creating
5000 streams and settings. Look at test/files/run/bug3376.scala or
jvm/interpreter.scala to see. Test case closes #3376, no review.
|
|
|
|
|
|
|
|
|
| |
I keep seeing huge simplifications available in the repl. Lot of
interesting features have come to town since it was first conceived. In
this commit I give the internal names some tips on aesthetics, and put
each line in its own package like civilized artificial constructs. No
review.
|
|
|
|
|
|
|
|
|
|
|
|
| |
up the stray interpreter files and put them in the interpreter package.
Would really love to change the name of that package. Went looking for
some consistent divisions of responsibility and consistent naming.
Made some progress. There are deprecated versions of most everything I
changed so hopefully the carnage will be limited.
This isn't completely baked but I just realized I broke the build
earlier and this should fix it. I'll keep the oven on. No review.
|
|
|
|
|
| |
Some overdue organization and cleanups in the repl. No review.
|
|
|
|
|
|
| |
Conflicts:
src/library/scala/concurrent/SyncVar.scala
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
replaced the epic outer.outer.outer by something more robust that goes
to the context corresponding to the enclosing class
nextOuter determines which context is searched next for implicits (after
`this`, which contributes `newImplicits` below) in most cases, it is
simply the outer context if we're owned by a constructor, the actual
current context and the conceptual context are different when it comes
to scoping: the current conceptual scope is the context enclosing the
blocks that represent the constructor body (TODO: why is there more than
one such block in the outer chain?)
review by odersky, extempore
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new murmur3 hashcode implementation contributed by rex kerr. I'm
really happy with it. There is benchmarking code included but you can
use the pudding for proof: the compiler compiling itself is clearly
faster. I deleted the existing murmur2 implementation which has never
left trunk in a release.
There remain some possible points of improvement with inlining and/or
synthetic method generation, but this is a major improvement over the
status quo. Closes #2537, review by prokopec.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integrated contributed non-recursive implementation of permutations,
combinations, subsets, by EastSun. Also gave mutable Seqs an in-place
transform method like the one Map has. And couldn't resist slightly
reformulating a few set methods, because how can we settle for
"forall(that.contains)" when we could have "this forall that". (Which is
also what normal people hear when we talk about sets.)
Closes #4060, #3644, review by moors.
|
| |
|
|
|
|
|
|
|
| |
Adapted specialization tests to track number of boxings.
Review by dragos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with a primitive CONCAT and several opcodes, I'm assuming nobody will
oppose this on principle. Given an expression of the exact form "" + x
(that is, the NPE-immune and much less ugly way to call .toString) we
used to get 4x the bytecode and create an unneeded StringBuilder. Now
this:
0: aload_1
1: invokestatic #20; //Method java/lang/String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
4: areturn
Closes #4160, review by dragos.
|
|
|
|
|
|
|
|
| |
Some modifications to @elidable: for reasons lost to me now it had a
default value such that annotated methods might be elided even if the
option wasn't given. It now does nothing in that situation. Closes
#4051, #4151, no review.
|
|
|
|
|
|
|
|
| |
prejudice and puts the new process code to work instead. There are still
a couple bugs on my short term partest list. If this commit causes some
weird issue which only arises on virtualized windows you can expect to
hear from me next by postcard from st. lucia. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Imported sbt.Process into trunk, in the guise of package
scala.sys.process. It is largely indistinguishable from the version in
sbt, at least from the outside.
Also, I renamed package system to sys. I wanted to do that from the
beginning and the desire has only grown since then. Sometimes a short
identifier is just critical to usability: with a function like error("")
called from hundreds of places, the difference between system.error and
sys.error is too big. sys.error and sys.exit have good vibes (at least
as good as the vibes can be for functions which error and exit.)
Note: this is just the first cut. I need to check this in to finish
fixing partest. I will be going over it with a comb and writing
documentation which will leave you enchanted, as well as removing other
bits which are now redundant or inferior. No review.
|
|
|
|
|
|
|
|
| |
In r22807 an optimization was added to remove Box(Unbox(x))
combinations. It turns out that without this in place, an expression
like "x".asInstanceOf[Int] will no longer throw an exception. Refined
the optimization. Closes #4148, review by dragos.
|
| |
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Reverting fix for #4047 until I figure out why it is failing on chara
and not on my machine. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
No review
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
| |
Fixed a bad interaction between overloading, default parameters and
specialization. Closes #3896, no review.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fixed infinite loop on call to super from a specialized method. This
happened only on illegal specialized inheritance. Closes #3651, no
review.
|
|
|
|
|
|
| |
Misc uninteresting tidbits to take some weight off overly large patches
in progress. No review.
|
|
|
|
|
|
| |
Modified the self-type protected accessor test to avoid unnecessary
runtime failures. Closes #4119, review by dragos.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even after the mostly blissful marriage of Traversable and Iterator
there was some fussin' and fightin' over who should have to care for
Option. Now there is peace among the collections once again.
// before
scala> Iterator(Some(1), None).flatten
<console>:6: error: value flatten is not a member of Iterator[Option[Int]]
// after
scala> Iterator(Some(1), None).flatten
res0: Iterator[Int] = non-empty iterator
Review by moors.
|
|
|
|
|
|
| |
The above issue was made explicit using the dx tool for the Android SDK
to convert Java bytecode to Dalvik bytecode.
|
|
|
|
|
|
| |
forward toString, but forwarding equals and hashCode breaks equality
with sequences. Closes #4122, no review.
|
| |
|
|
|
|
|
|
|
|
|
| |
Bencharking a larger program with parallel collections.
Fixed a couple of bugs in parallel collections.
No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Don't transform patterns during superaccessors: the matcher can't deal
with funny trees. Closes #4062, review by dragos.
|
|
|
|
|
|
|
| |
Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint
into scala.annotation and enabled the deprecated type aliases in scala.*
to point there. Also enclosed is a new starr to bootstrap. No review.
|
| |
|
|
|
|
|
|
|
|
| |
Cleaned up and brought up to date the help text for -X and -Y options.
Made some enhancements to PhasesSetting, which are documented if you
run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed
others to reflect their current purpose. No review.
|
| |
|
|
|
|
|
|
| |
Parameterizes TraversableFactory.range so it can be used with any
integral type. Closes #3542, no review.
|