Commit Graph

14910 Commits

Author SHA1 Message Date
Adriaan Moors a74698486d Made clear that this repo is obsolete 2014-01-08 11:15:26 -08:00
extempore 87b2aa91d7 Fix for octal test.
At the last minute I made -Xfuture leading-0 an error and
failed to update the checkfile.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26093 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 20:18:13 +00:00
rompf 90f4ba32a2 improve cps handling of if-then-else. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26092 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 18:56:51 +00:00
extempore 2a34d20013 Fixed -Xfuture 5.ds, deprecated 0-octal.
I messed up my trip to the future the first time around; now in
the future 5.f is not an error but an attempt to call method "f"
on 5 like nature intended. (Thank you simon for catching this.)
And deprecated leading 0 for octal.  Closes SI-5205.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26091 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 18:10:55 +00:00
extempore d2f941517d Fixes for 3 tests which aren't failing.
Which should be failing, and would be failing if they were being
compiled by trunk, since they used methods which don't exist. Why aren't
they failing? That is the real mystery. In the interests of removing a
disincentive to track that one down, I future-proofed them against that
day when they start being run like they're supposed to be.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26090 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 18:10:30 +00:00
extempore 71835ea33c Fix for build.xml classpaths.
Found the cause of plugin build failures which have long haunted me at
inopportune times.  It's all built against locker instead of quick.
Kind of a buzzkill to be fixing this during the "Ant End Times" but
better now than never.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26089 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 18:10:11 +00:00
burmako a67de4c5d1 Moved the test for SI-5230 from files to pending
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26088 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 16:31:17 +00:00
burmako 64aab2b68a Added the check against UnitClass in freeLocalsTraverser.
Closes SI-5245. Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26087 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 15:25:45 +00:00
burmako ed167e7120 Test for SI-5230
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26086 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 14:45:17 +00:00
odersky 78a78d9942 Attempt to fix #5230. Review by burmako.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26085 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-29 12:06:30 +00:00
odersky e223616e4b Small change to get rid of naming awkwardness for macros. Class based macros now have a parameter section (_this: Tree), module based macrod have an empty pararameter section () instead. So we can let them have the same name, because overloading resolution will distinguish them anyway. Review by burmako.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26084 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-28 18:08:40 +00:00
burmako 7e7db94561 -Yreify-copypaste: the copy/pasteable mode for reification
When experimenting with macros, I've found out that it's helpful 
to use the reifier to find out what Scala idioms map to what Tree shapes.
However, stuff emitted by -Yreify-debug is too verbose, that's why I decided
to put up a human-readable dumper.

To use the dumps, you need to first import the following things:
import scala.reflect.api._
import scala.reflect.mirror._
import scala.reflect.api.Modifier._
import scala.reflect.internal.Flags._

The stuff is really experimental, e.g. the tension between flags and modifiers
needs to be thought out and addressed. Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26083 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-28 15:02:48 +00:00
odersky e5b9ceba71 Revised macro defs, added a test case. Review by burmako.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26082 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-28 13:55:31 +00:00
burmako 4254a02bb9 Reflection toolboxes now respect settings that are provided to them.
Before the fix CompilerCommand lacked the (args, settings, errorFn) ctor.
I added it and provided means to augment passed settings with custom errorFn.

Closes SI-5239. Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26081 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-28 13:37:52 +00:00
vogt 4ded67368f test case for SI-3566
no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26080 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-28 11:11:29 +00:00
odersky 0095854ff0 Experimental version of macro definitions. Macro calls need to be done next. No review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26079 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-28 11:01:12 +00:00
extempore 7bce33982a Fix for erroneous bytecode generation.
A remedy for an IllegalAccessError where generated bytecode
referred to an inaccessible type.  Closes SI-1430.

Bonus materials:

 - tore out all the invokedynamic support.  The shipped jdk7
 implementation shows limited resemblance to the one this was written
 against; the code mostly serves to distract.  (I think I could get
 invokedynamic working pretty quickly, except that it would
 mean having a codebase for java7 and one for 5-6, which is not a yak
 I wish to shave today.)

 - gave NullClass and NothingClass objects of their own, which
 allowed a nice polymorphic simplification of isSubClass, plus a
 couple other streamlinings.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26078 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-28 08:03:10 +00:00
michelou da8c20001b fixed logic error in ant tests
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26077 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-27 20:07:45 +00:00
michelou 98622693e4 added support for ant tests to partest
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26075 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-27 15:57:15 +00:00
michelou 166671da6e updated test cases for Scala Ant tasks
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26074 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-27 11:41:16 +00:00
michelou 4f3d4f91c4 attempt to fix reopened SI-5196
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26073 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-27 11:39:54 +00:00
extempore b11147e5d9 Annotations reacquainted with reification.
Had AnnotationInfo extend Product3 since it's no longer a case class.
Tried to make reflection a little more robust.  Closes SI-5223, review by vogt.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26072 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-26 07:39:27 +00:00
moors a2a6dfc28d low-hanging optimization fruit for virtpatmat
removed unnecessary zero that was added to all matches...

providing runOrElse's type args explicitly: speeds up compilation, removes hacks needed to bootstrap

a bit of clean up to keep a list of list of treemakers, which encodes the match, until the last possible moment
this list of list is going to be the subject of the analyses coming next

no review

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26070 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-24 14:55:11 +00:00
odersky 03f2abc63a Fast PartialFunction # orElse. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26069 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-24 09:25:00 +00:00
extempore df4374d0bc Reduced accumulation of repackExistentials.
Was enjoying watching adriaan go for the record for redundant
implementations of repackExistential, but eventually everyone has to
join Club Code Reuse. Trimmed 2/3 of the implementations and put the
remaining third somewhere it can be enjoyed by all. Continued by tearing
apart and reassembling TypeVar. Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26068 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-24 05:57:03 +00:00
extempore 17ba3bbe03 Minor restructuring in Implicits.
Another case where I tried to get into the performance party
but ended up playing dungeons and dragons next door.  However I
did come away with an attractive tablecloth, which I draped over
Implicits.scala before waving my magic wand.

TRANSLATION: it's probably not faster but it's still better.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26067 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-24 02:01:00 +00:00
extempore 671b60e46a Optimization of typedArgs.
Keep seeing what might be our single use of Tuple3#zipped so high in
the profiling output. I don't think it's zipped3's fault, more that it
figures prominently in a major consumer of compile time, but it's not
going to hurt to send it on its merry way.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26066 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-24 01:24:47 +00:00
extempore f07d22d397 Refinements of "def seq" and murmurhash.
Trying to make hashcodes faster. Didn't achieve much on that front, so
redirected into structural/consistency issues. The latter was lacking
in terms of how/where "def seq" was defined. The documentation I can
find doesn't give me much hint that the sequential form of my sequential
collection might be a single-use iterator! (As in StringOps, ArrayOps.)
If that's intentional it should be in huge letters. I'm assuming for now
that it wasn't.

Also, there was this:

  GenMapLike:     def seq: Map[A, B]
  GenSetLike:     def seq: Set[A]
  GenSeqLike:     // nothing, returns Traversable

So I added some def seqs where I needed the more specific types for
my hashcode work. Hashcodewise, I broke the MurmurHash3 object into
a reusable class and a collections-specific object, and I deprecated
the methods which took GenTraversableOnce in favor of ones taking
TraversableOnce, because there's no reason the hashcode library should
have to know about things like "make sure to call seq before you
traverse or you'll be sorry." Exclude things by their type and you can
never make a mistake. End transmission.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26065 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-24 01:24:28 +00:00
extempore eb0ba5c9f5 AnnotationInfo inertia takes me into continuations.
And kept carrying me until I was carried away.  The changes are
mostly of the janitorial variety, just doing my part to make the
interesting logic visible without being buried in low level
compiler plumbing.

Added at least one seriously convenient convenience method:

  tree modifyType fn
  // equivalent to if (tree.tpe == null) tree else tree setType fn(tree.tpe)

This is the analogue to the recently added:

  symbol modifyInfo fn
  // same idea

It's like having our carpets steam cleaned when we can keep pushing
until machinery stays in the machine and the relevant logic stands
gloriously on top. You'll eventually exclaim, "I didn't even know these
carpets were that color!"

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26064 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 23:09:30 +00:00
extempore ec654a653c New starr based on r26060.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26063 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 19:30:52 +00:00
michelou f1fbe5e026 updated some code examples
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26062 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 18:26:50 +00:00
michelou e41184fd2e fixed deprecated number syntax
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26061 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 18:25:08 +00:00
vogt e0f04113cb - fixed code lifting of String, Int, ...
Closes SI-3566. Review by moors.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26060 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 17:02:03 +00:00
odersky 8afac897df Slightly revised version for the new starr.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26059 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 15:09:02 +00:00
odersky c72e1fa04d Preparations for new version of AbstractPartialFunctions that also does isDefinedAt correctly. Should be a new starr. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26058 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 13:00:35 +00:00
szeiger b531620b9c Enabling the use of 'compilerarg' with 'scalacfork' task in the build process.
'compilerarg' was added in r26030 and pushed into starr with r26055. No review.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26057 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 12:03:50 +00:00
extempore 909b467f63 Reworked AnnotationInfo patch.
Took a more ambitious swing based on input from martin.
Eliminated the external map and gave annotations a more
useful inheritance hierarchy. Eliminated AnnotationInfoBase
and made LazyAnnotationInfo an AnnotationInfo (just like
LazyType is a Type.) Review by odersky.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26056 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 03:11:53 +00:00
extempore 29136bfcfb New starr based on r26049.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26055 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-23 00:30:20 +00:00
moors e6c345a323 type test optimization now takes GADT hack into account
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26054 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 23:10:30 +00:00
moors 10314b0cb4 optimized typedSubst
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26053 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 23:10:26 +00:00
moors 06f234e3e4 optimizing type tests and related stuff
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26052 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 23:10:23 +00:00
moors 2121b0f097 a wider variety of treemakers
optimized combining substitutions
why we substitute in EqualityTestTreeMaker

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26051 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 23:10:19 +00:00
moors 0ea45b6749 optimized version of cond
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26050 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 23:10:15 +00:00
odersky a5c67c0b5b fixed extraneous output. no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26049 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 20:11:52 +00:00
ureche a64ac8eb39 Changed the way use cases are handled in scaladoc.
If use cases are present, the original member disappears from the list. References SI-5054, but needs more work on the html part.
If use cases are present along with links, scaladoc doesn't crash anymore. Closes SI-4898.
    
Review by kzys.


git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26048 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 19:09:28 +00:00
szeiger 4659eb0fa1 Make partest work with spaces in the path (from batch script and ant task).
- The 'partest' ant task gets a new 'compilerargs' element for scalac options (like in scalacfork and javac).
- Fixed argument list handling in partest task.
- Further improvements to argument list handling for all ant tasks.
- Fixed argument list handling in DirectTest (used by partest shell scripts)
- Fixed path handling in several test cases.

Closes SI-622. Review by phaller.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26047 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 18:44:00 +00:00
odersky 33d22581b2 Compiler part of fast orElse. Review by moors. t1545 got disabled. As the comment there says:
"According to the spec this code should not be legal. Disabling for now." Need to come back and either make it work or (more likely) make nsc reject the test)

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26046 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 18:07:51 +00:00
odersky 636f6e0793 More beautiful fast orElse infrastructure. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26045 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 14:31:40 +00:00
odersky e6677eea1c First part of campaign to make orElse on partial functions faster than exponential. In fact, now it's linear, with zero overhead for the common case. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26044 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 13:25:29 +00:00
amin e14da1b8ef Move allDeclarations to make it available to all types, like declaration(...). Review by odersky.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@26043 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
2011-11-22 13:15:15 +00:00