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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
- 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
"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