Commit Graph

12741 Commits

Author SHA1 Message Date
prokopec 7cd12014a7 Adding immutable parallel hashsets.
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
2010-10-05 16:22:21 +00:00
extempore 4a5e28e666 Improves exhaustiveness analysis to not warn about types which
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
2010-10-05 15:34:37 +00:00
prokopec cf13f6d046 Reverted a test. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23198 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 15:14:36 +00:00
prokopec 0d7b196fb4 Added back another previously failing test. No review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23197 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 11:39:39 +00:00
prokopec 79869be013 Added back a failing test. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23196 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 11:37:53 +00:00
prokopec e0750b71ce Disabled a failing scaladoc test. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23195 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 10:24:58 +00:00
prokopec cca58a1be2 Disabling a test from last commit until figuring out why it fails on the server. No review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23194 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 09:13:42 +00:00
prokopec 6143f47005 An issue with scalacheck and actors where an excess of thread pools gets created - tmp fix. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23193 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 08:06:12 +00:00
extempore cb10c89599 Somewhere along the way AnyVal stopped working as sealed. (It was
still sealed but had lost its children.) Closes #3163, review by rytz.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23192 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 02:59:24 +00:00
extempore db8f536c20 Massively simplified the exhaustiveness checker with no measurable loss
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
2010-10-05 02:59:06 +00:00
pedrofurla b8cde80af3 Checkes the size of the author list properly
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23190 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-05 01:43:45 +00:00
eugenevigdorchik 53c3f16bf0 Locator should follow TypeTree#original to get the smallest tree containing a position. review by odersky
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23185 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-04 17:20:40 +00:00
extempore 2eaab81ad6 Reverts r23174, which I believe will bring the build back to
life.  It only chokes under -optimise.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23184 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-04 16:15:17 +00:00
prokopec 93253a1b8a Fixed a scalacheck test group "test entire subdirectory" problem. It's now possible to add scalacheck tests consisting of multiple files. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23183 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-04 14:05:35 +00:00
eugenevigdorchik e15d23d7ae init currentTyperRun rather than leaving it null.Typo. review by odersky
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23182 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-04 07:27:22 +00:00
extempore 14814a6534 Another batch of busywork shuffling the contents of pending
around.  Can almost see some daylight.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23181 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-04 06:22:31 +00:00
extempore faa8737d9a Pattern matching on Array types, working for reals.
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
2010-10-04 05:28:27 +00:00
pedrofurla 608824b938 Authors taglet is back to docs. review by dubochet.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23179 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-04 03:27:09 +00:00
extempore 6467a71ac1 Work on the pattern matcher. Inspired by mark harrah submitting
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
2010-10-03 22:53:59 +00:00
extempore 2cbc9d3f30 Removes a bunch of private functions which are never called.
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
2010-10-03 04:11:32 +00:00
extempore dd62f9e895 One last batch of test cleanups and I think I'll call it a day.
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
2010-10-03 03:19:21 +00:00
extempore 762e976f03 The next batch of tests put up a little more struggle, but only a little.
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
2010-10-02 23:19:16 +00:00
extempore 1e9fdc869b Sorting through the tests in pending from oldest to newest because
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
2010-10-02 22:43:10 +00:00
plocinic 8387d42c8f Another attempt for #1591. Do not do name expansion for module vars, better scaladoc handling. Review by dragos, dubochet and rytz (general, scaladoc and serialization respectively).
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23164 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-10-01 17:10:27 +00:00
extempore d63a0e032d Still giddy with the thrill of fixing #266, I vanquish another
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
2010-09-30 20:53:04 +00:00
extempore b6421898b4 While trying to come to an understanding with #3869 I had one of
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
2010-09-30 20:52:47 +00:00
dubochet 75af310aee [scaladoc] JavaScript template search uses a statically built index to considerably increase performance. Contributed by Kato Kazuyoshi. Review by dubochet.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23157 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-30 10:08:20 +00:00
odersky 2248105a2a Reverted an earlier binary incompatible change rolled into r23139. Now, the presentation compiler should have no binary incompatibilties with 2.8.0
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23144 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-29 15:42:39 +00:00
odersky 49f01c8560 Changed Response so that get does what it did before, and get(TIMEOUT) returns provisional results if it can. Review by vigdorchick.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23141 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-29 13:42:47 +00:00
eugenevigdorchik c5319437e9 need an access to compileRunner from Eclipse to check the thread I'm called and not post a work request if I'm already in compiler thread. Review by odersky
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23140 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-29 10:44:51 +00:00
odersky 88df9bebf4 Closes #3875. Review by vigdorchick.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23139 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-29 09:57:49 +00:00
plocinic e7003999a2 Revert changes related to #1591. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23138 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-29 09:47:54 +00:00
plocinic 80d751c8d4 Fixes scaladoc issues with lazy vals. Review by dubochet
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23137 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-29 01:37:37 +00:00
extempore 2a5910701d More beautification of icode checker output. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23132 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 22:13:52 +00:00
extempore ad46d2f645 Modified typekinds to offer a more general lub when it encounters
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
2010-09-28 22:13:38 +00:00
extempore 0d168aa913 Integrating feedback from martin and iulian into recent patches and
prettifying checker output.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23130 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 22:13:25 +00:00
moors e0559595dc partial revert of r23128 ("see #3859. need to instantiate type parameters to nothing explicitly in manifestOfType's searchresult rather than relying on later calls to instantiate."): the isArray_apply test cleanup was not a good idea (my pre-commit automated testing turned out to be broken.. me.gitfu--)
no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23129 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 20:20:21 +00:00
moors da3494ab56 closes #3859. need to instantiate type parameters to nothing explicitly in manifestOfType's searchresult rather than relying on later calls to instantiate.
review by odersky

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23128 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 15:46:41 +00:00
moors 492c65b00d closes #3865: scaladoc now prints anonymous type functions since they may occur due to normalization of type constructor arguments of inferred types
review by dubochet

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23127 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 15:46:36 +00:00
extempore 3de373725e Fix and test case for #3855. The uncurry stage now notices more
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
2010-09-28 15:43:32 +00:00
extempore dd752c9e33 A little reorganization of some pattern matcher logic. I must have
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
2010-09-28 15:43:01 +00:00
extempore 2adc29ea8b Refined crash avoidance related to self type tests in anonymous classes
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
2010-09-28 15:42:35 +00:00
extempore a199a042b1 Fixed an ancient crasher in explicitouter involving singleton
self-types.  Closes #266, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23123 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 15:42:05 +00:00
odersky 1eb8dbb42a replaced deprecated method call. review by rytz.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23122 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 15:28:46 +00:00
rytz 4f50dac27c Update comment in ByteCodecs. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23119 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 12:27:53 +00:00
prokopec 9a06291f69 Fixes an infinite loop. Root package entity implementation overrides isPackage to return true, instead of querying the root package symbol from Definitions which for some reason returns false. Review by dubochet.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23118 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-28 08:48:35 +00:00
extempore 0d987595eb Cleaning up the contents of test. Revived all the scalacheck tests,
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
2010-09-28 00:51:25 +00:00
extempore 4bcab0a29e Bringing the tree and icode checkers back to life. Try this:
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
2010-09-27 19:51:27 +00:00
moors c7e5c4415e closes #3873. fixed unsoundness in dependent method types reported by Ingo.
review by maier as no good deed goes unpunished

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23111 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-27 13:27:35 +00:00
prokopec 0cce049b9a Fixes comments in Map and mutable.Map. No review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23109 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2010-09-27 11:03:57 +00:00