Commit Graph

14519 Commits

Author SHA1 Message Date
extempore ecc227949c Disabled all the old scala.reflect._ tests which are now
crash-failing, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25416 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-29 21:38:38 +00:00
extempore 58784b2d2a Quieting down mr. lifty, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25415 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-29 20:56:52 +00:00
extempore f286c27088 Fixing the very broken build (was going for "compiling" mostly
because I can't be sure what to do with some of this) really this
code is certainly not correct, please review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25414 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-29 20:45:23 +00:00
odersky b3a00b1c2f First steps towards lifting
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25412 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-29 18:26:00 +00:00
extempore 470eac0c18 Discovered through jsuereth's work that a file I should have
removed way back in r17897 slipped the noose.  Your free ride
ends here, midpapi10.jar.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25411 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-29 17:33:54 +00:00
extempore 418cd6fe92 Added two new compiler options:
-Ywarn-adapted-args   // also included in -Xlint
  -Yno-adapted-args

The former warns when a () is inserted or an argument list is implicitly
tupled. The latter errors under the same conditions. Using these options
I found several bugs in the distribution which would otherwise be nearly
impossible to spot. These bugs were innocuous (I think) but similar bugs
could easily be (and have been) otherwise.

Certain particularly threatening scenarios are at minimum warned about
regardless of options given.  Closes SI-4851, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25410 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-29 15:38:50 +00:00
extempore 6343836f38 Turned off the notFINAL flag which was applied to expanded name methods
due to java breakage, on the principle of "first, do no harm." If there is
some rationale why these methods must be made final, let's at least get
it documented.  Review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25408 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 23:35:26 +00:00
extempore 9febcafb5d Expression type argument instantiation should not fail in a context
expecting Unit if there is any valid instantiation, because value discarding
should kick in and offer a literal ().  Closes SI-4853, review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25407 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 22:26:57 +00:00
extempore 7e2537eff1 New starr based on r25394 to make the starr liberator's job easier, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25406 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 20:32:58 +00:00
extempore 292e82e374 Test case for SI-4603, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25403 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 18:14:26 +00:00
extempore 42a3e40d67 Remove sigint handler on repl exit as a sanity check, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25402 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 18:14:09 +00:00
odersky c06e31f78b Closes #4603. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25394 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 13:50:21 +00:00
kzys 9cb04ea1c4 Scaladoc shouldn't drop type arguments to aliased tuple. Related to SI-4676. Review by pedrofurla.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25393 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 13:34:23 +00:00
extempore a0292eea4a Changed forwarders not to generate final methods, which otherwise would
induce VerifyErrors anytime the companion class was subclassed and had a
method with the same signature.  Closes SI-4827, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25392 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-28 07:04:26 +00:00
extempore cf20032839 Test case closes SI-4172 - I think the output is right anyway - review by rytz.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25391 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-27 21:00:20 +00:00
extempore 36ad9ef17f Some tweaks to repl thread creation based on speculation from
mark harrah, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25390 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-27 21:00:07 +00:00
extempore 2ce1b7ae0e Debug output to help with signature issues. Moved some code review
comments into code comments for reference by me or some lucky future
person.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25389 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-27 20:59:50 +00:00
extempore a311641357 A few tests for pending and non-pending, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25388 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-27 20:59:33 +00:00
extempore e740bc1c7b "Freed the lisp test." Tweaked partest defaults a little in the hopes
that seth tisue is correct in his analysis.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25387 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-27 20:59:13 +00:00
extempore 6419e377e3 Fix/workaround for inliner bug uncovered by finalizing Option methods.
Something in the backend is leaving open but empty blocks in the worklist.
Rather than freaking out at the merest mention of an empty block, I
quietly remove the empty ones.  A proper fix will involve not leaving
empty blocks lying around but we're on a schedule here people.
Review by dragos.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25383 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-27 00:52:47 +00:00
prokopec 467840cb80 Adding the missing ParMap and GenMap methods.
No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25382 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-26 17:06:49 +00:00
extempore 6e8c8703a7 Discard empty strings in option position, but not in argument position.
Closes SI-4782, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25376 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-26 15:20:10 +00:00
phaller a279cee490 Add test for SI-4839. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25372 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-26 00:08:04 +00:00
phaller f9acc1aa1c Enable implicit parameters in the presence of view- or context bounds. Fix SI-4839. Review by moors.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25370 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-25 23:50:55 +00:00
kzys 8cdeb332e1 Scaladoc should decode symbolic type alias name. Fixes SI-4715. Review by pedrofurla.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25367 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-25 14:04:01 +00:00
grek 96418be31d Always escape control characters when printing trees.
Escaping of control characters should be performed for
both Char and String constants. This is useful when
printing trees of a program that contains control
character as constants. Before that fix, one could get
really broken output that was hard to read.

Review by extempore.


git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25366 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-25 13:36:57 +00:00
heathermiller 40b9970857 Updated documentation for testing.Benchmark. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25353 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-24 00:32:01 +00:00
extempore 551dd91342 Since trunk seems to be undergoing all kinds of changes of the sort
which touch lots of files, the time is ripe for various search/replace
improvements which have stacked up.  This one is the replacement of
all "if (settings.debug.value) log" with "debuglog" since as noted
in a recent commit, the inliner will take care of that for you.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25352 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-23 22:50:46 +00:00
extempore 8590c23f6e Start of an attempt to abstract above some hardcoded name mangling
decisions so they can be modified, something we need to do to fix
long-standing problems with inner classes.  It's not easy.  This
commit doesn't actually change much, it's primarily setup.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25351 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-23 20:50:24 +00:00
odersky 8705a7f8b8 Reflection refactoring.ō
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25341 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-22 17:19:07 +00:00
odersky bd690dd9e3 Small fix to mirrors in treatment of primitive types. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25338 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-22 09:24:31 +00:00
kzys e9b37f627f Should not set the parameter name's width on CSS. Fixed SI-4589. Review by pedrofurla.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25337 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-22 01:50:17 +00:00
extempore 6b9cdcd09d As per discussion documented in SI-1799, brought back the ProductN
traits and synthesized them into case classes. It's -Xexperimental for
now because there may be minor implications for existing code which
should be discussed. And also because I snuck in another "improvement"
but it's probably too dangerous to be touching productIterator directly
and it should go into something else.

  scala> case class Bippy(x: Int, y: Int)
  defined class Bippy

  scala> Bippy(5, 10).productIterator
  res0: Iterator[Int] = non-empty iterator
                 ^^^----- as opposed to Iterator[Any]

There is an even better idea available than lubbing the case class field
types: it starts with "H" and ends with "List"...

Review by oderksy.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25336 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-21 23:35:54 +00:00
odersky 782e461ef4 Fixed build problem. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25335 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-21 17:34:57 +00:00
odersky 2d36072b9b Adding mirrors top connect reflection to something real without going through Java.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25334 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-21 16:39:09 +00:00
odersky fe89a973e2 Fleshed out Scala -> Java mapping; dealing with arrays. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25333 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-21 10:13:43 +00:00
phaller 08ee19e491 Fixed doc comments of the keys and values methods in MapLike. No review
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25332 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-20 22:46:37 +00:00
michelou c6dba950a2 4th round of clean ups (see r25293, r25285, r25292)
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25331 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-20 21:52:50 +00:00
odersky 0aa0c7a180 Fleshed out reflection that now also correctly interpretes Java classes. We are getting there! No review; let's wait until it is complete.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25330 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-20 16:39:39 +00:00
kzys 9cee82e70e Fixes SI-4641 again. But we should move this code from JavaScript to Scala side.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25329 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-20 14:32:12 +00:00
dragos a23520c187 One more package rename that broke the IDE nightly for trunk. Fixing. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25328 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-20 08:43:28 +00:00
extempore e70f043d15 Restored test case for SI-2873 which hubert had callously deleted
back when it was briefly irrelevant.  It would have been failing were
it around, but now it passes.  Closes SI-2873, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25327 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-19 21:25:40 +00:00
extempore f9d0928809 Fixed a subset of extant signature issues.
When generating signatures, one must be careful finding the name
of a class, because sometimes things with a name like "Foo" need
to appear in signatures as "Foo$".  I could really use some help
establishing tests here.  Here's the diff of RedBlack's javap:

< const #81 = Asciz	()Lscala/collection/immutable/RedBlack<TA;>.Empty;;
---
> const #81 = Asciz	()Lscala/collection/immutable/RedBlack<TA;>.Empty$;;

RedBlack and RedBlack$Empty$ are the only classfiles in the library
outside of swing which are affected, which nicely explains their frequent
appearance in past tickets.

Review by grek.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25326 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-19 21:15:41 +00:00
extempore 2d54b3b09f Sprinkled some quiet dust on the compiler.
I think it a reasonable goal that one should be able to do the following
and have some chance of seeing anomalies before firing up advanced text
processing tools:

  scalac -Ylog:all a.scala

At least until/unless we have some way of generating output in between
"user-level visible warnings" and "notice of interest once you're
peeking under the hood." As a rule of thumb, any code which echoes a
thousand lines when compiling HelloWorld should be gently shoved into
debuglog. (Or anything which is sure to print for every classfile,
every method, etc. etc.) Especially, any code which is going to simply
reference Tuple2 and then echo a line for every specialized variation of
that class is being unreasonably taxed.

While I was quietizing, I changed various 'if (settings.debug.value)
log' usages to call debuglog. Hey everyone, you can do this without
penalty now, the inliner turns around and inlines the same code, and
it's so much less unsightly. No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25325 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-19 19:31:11 +00:00
odersky b4531f6ab5 Refactored infoTransformer functionality from nsc.transform to reflect.internal.transform. Needed so that we can find Java methods that correspond to Scala methods. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25324 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-19 13:57:37 +00:00
extempore 5ea6a63be8 Modified erasure so we have enough information to determine whether
we need to use scala or java erasure semantics.  This fixes the runtime
failure illustrated here:

  % scala29 -e 'java.util.Collections.max(null)'
  java.lang.NoSuchMethodError: java.util.Collections.max(Ljava/util/Collection;)Ljava/lang/Comparable;

Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25323 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-18 21:05:23 +00:00
extempore 1b97bc681a Fixed adriaan's patch for type constructor inference. The problem
with haranguing people in bars about bugs is that the fixes with
which they provide you may be flawed.  Fortunately moors has this
novelist on retainer.  Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25322 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-18 21:05:05 +00:00
odersky 28a1462f72 Small babystep to show Scala -> Java mapping in reflection.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25321 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-18 14:02:26 +00:00
extempore 56a2c11303 Workaround for scalacheck calling System.exit during testing.
Not sure exactly what the sequence of events is here: I found
the exit problem months ago and committed code to scalacheck
to make that configurable, and then didn't see it again until
recently, but I don't think it was ever addressed.  This is
just a bandaid.  No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25320 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-18 08:00:13 +00:00
extempore 74115eb849 Brought scalacheck up to date with scalacheck trunk (rev 06612e965d)
and rebuilt jar against r25318, no review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25319 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-07-16 20:44:05 +00:00