Fixing an issue with hashset splitters where the splitting does not work if some elements have already been iterated.
Added parallel collections exception handling.
Added parallel collections break control.
Renaming ParHashTrie -> ParHashMap.
The part with immutable.{HashSet, HashMap} - review by rompf
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23200 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
cannot match due to nonconformant type parameters. Also, look at the
different warnings emitted in the test case based on the presence
of a constraint. Nifty! Closes#3683, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23199 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
of fidelity. I might be the only one who can be unsurprised by such a
bloody diff: anyone else would rightly say "how on earth..." No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23191 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23180 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23174 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23173 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
If you're worried I didn't leave any for anyone else, let me put
your fears to rest. PLENTY left to sift through. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23172 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
See test/pending/pos/unappgadteval.scala (the changes for which were
in the previous commit) for an example of a test which might be on
to something. Any idea what it would take to get it working?
// the key lines
case i @ Suc() => { (y: Int) => y + 1 } // a = Int => Int
case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c
No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23171 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
I don't believe in having useless appendages. The verdict on the
oldest fifteen tests is: 15/15 are fixed. Many were already in
files under a different name. I moved a few and deleted the rest.
Fun fact of the day: apparently there was a time when to call into
java varargs with no arguments you might have to write something like:
getClass().getMethod("getCount", Array[java.lang.Class[T] forSome { type T }]())
On this basis I retract any complaints I've ever had about anything.
There is one question mark outlined in pos/testCoercionThis.scala,
a file formerly called pos/moors.scala and therefore... review by moors.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23169 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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?)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23159 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23158 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23131 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23126 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23125 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23124 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
including "CheckEither", written against scalacheck 1.2 in the year 471 AD.
Removed all the duplicates I could find, mostly between pending and files.
Renamed a bunch of tests so they wouldn't look like likely duplicates next
time around. Nominated somebody else to do this once in a while.
No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23117 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
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.)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23112 5e8d7ff9-d8ef-0310-90f0-a4852d11357a