| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
More repl hardening, and a new jline jar which fixes a paste issue on
OSX. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Told the boy trying to plug the dike holes that he can go home. Instead
of trying to catch unpositioned EmptyTrees from the XML parser, don't
generate them. It's the kind of commit you would tell your grandkids
about if your grandkids could sit still for five seconds: fixes bugs
by deleting code and eliminates extraneous error messages to boot (see
.check diffs.) No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New jline: BSD licensed, based on [ https://github.com/jdillon/jline2 ]
with additional code thanks to [ https://github.com/huynhjl/jline2 ].
Replaces lib/jline.jar with build of these sources, and modifies trunk
code to work with the new jar.
Hopeful improvements including baseline functionality on cygwin
and 64bit windows, as well as more accurate line wrapping / cursor
positioning on all platforms and ctrl-R history search.
For the time being the canonical source repository is this:
https://github.com/paulp/jline2
The enclosed sources are a mirror of that repository, and should be
treated as read-only in the scala svn repository.
No review, codewise, but people are very strongly encouraged to try it
out and report any regressions.
|
|
|
|
|
|
| |
That cunning underscore tricked me into quoting it and changing some
test output. No review.
|
| |
|
|
|
|
|
|
|
| |
import scala.`package`.Throwable
not to break the repl. Closes #3673, no review.
|
|
|
|
|
|
|
| |
one deprecation, one unchecked, and one "other", each of which
volunteers no mechanism for suppression. (It would be nice to change
this.) No review.
|
|
|
|
|
|
|
|
| |
Turned an assert/compiler crash into an error message. Admittedly the
error output is still terrible (the XML positioning looks like it came
from an RNG) but more helpful than the crash. Also misc advantage of a
handy new method. Closes #4069, no review.
|
|
|
|
|
|
|
|
|
|
| |
When was the last time -Xcheckinit was run? It must have been a long
time. All these changes are to address bugs revealed by -Xcheckinit,
mostly in test cases, some in the compiler. I'm guessing the partest
-Xcheckinit runs are hanging the first time they run into a failure, so
if it starts "working" again after this commit don't get too confident.
No review.
|
|
|
|
|
|
| |
Eliminated the 10 unchecked warnings emanating from RedBlack.scala. No
review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I found myself unable to make the necessary parser improvements for the
pattern matcher without breaking it down better. This patch represents a
lot of work. Too many booleans were being threaded in an arbitrary way
through parse productions, resulting in an abundance of expressions like
annotations(true, false)
path(false, true)
Also there was too much duplication of code, and unnecessary use of
mutable state. So here are the main points:
* much less code duplication
* many listbuffers as arguments eliminated in favor of good old
fashioned call a method and use the result
* several booleans eliminated in favor of grouping methods by calling
context, so the booleans emerge automatically
* misc bug fixes, such as the fact that most operators which start
with a letter have been getting the highest precedence instead of
the lowest. (I can say most because it's definitely true by the
numbers: nobody has reported it because a-zA-Z do the right thing,
it's _, $, and the entirety of the Unicode letters which were wrong)
* sporadically introduced/improved documentation
* misc better error messages, like:
scala> import scala.{ _, String => Bob }
// before
<console>:1: error: '}' expected but ',' found.
import scala.{ _, String => Bob }
// after
<console>:1: error: Wildcard import must be in last position
import scala.{ _, String => Bob }
^
Anticipating the performance objection, I measured it and the difference
is immeasurable. And the usual finish: I can't imagine anyone being
interested in or willing to review this, but am all ears if there are
counterexamples. Meanwhile, no review.
|
| |
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
|
| |
Array combiners implementation changed from array buffers to doubling
unrolled buffers to avoid excessive copying. Still evaluating the
benefits of this.
No review.
|
|
|
|
|
|
|
|
|
|
| |
Fixed parallel ranges to use the same range logic under the hood, and
not introduce code duplication.
Slight fix in Tasks.
No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Special cased with thread pool executor scheduling. Fixed an ugly
concurrency bug where futures returned by a thread pool executor didn't
remove the task from the queue when cancel was called. Note to self and
others: don't cancel futures returned by thread pool executors, it might
lead to unexpected behaviour. Modified the executor to add new threads
if all the active threads are syncing, in order to avoid deadlocks.
Fixed a hidden bug in AdaptiveWorkStealingTasks, where correct behaviour
depended on the execution order of the tasks. This didn't fail before
with ForkJoinTasks, since there the execution order is well-defined.
Scalachecked 1.5 & 1.6 support.
No review.
|
| |
|
|
|
|
|
|
| |
again: relax access boundry check for overriding protected java members.
review by eugenevigdorchik.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I learned from #4067 that we don't have any kind of signature validation
yet. I could swear someone did that. Anyway, I did. If you give option
-Yverify-generics it will yell at you for any that are invalid. For
instance, the one in the ticket.
% scalac -Yverify-generics -d /tmp
src/library/scala/collection/immutable/List.scala
[BAD!] method orElse in scala.collection.immutable.List
<A1:IB1:Ljava/lang/Object;>(Lscala/PartialFunction<TA1;TB1;>;)Lscala/Par
tialFunction<TA1;TB1;>; [BAD!] method
orElse in scala.collection.immutable.List
<A1:IB1:Ljava/lang/Object;>(Lscala/PartialFunction<TA1;TB1;>;)Lscala/Par
tialFunction<TA1;TB1;>;
Of course you still have to figure out what is wrong and why. Review by
moors, dragos.
|
|
|
|
|
|
|
| |
An unfortunate missing character in r22946 turned listbuffer into an
append-only machine. I was the reviewer on that commit and I am sad that
I missed it. Closes #4066, no review.
|
|
|
|
|
|
|
| |
The lords of attrition informed me that "isTypeApply" is passed all over
the parser but nobody ever eats the hot potato. I put the potato on ice.
No review.
|
| |
|
|
|
|
|
|
| |
Made it possible to give :cp an argument with spaces. Closes #3819, no
review.
|
|
|
|
|
|
|
| |
Extricated Addable and AddingBuilder from the few classes still
utilizing them and deprecated both. Closes #4059. Already endorsed by
odersky, so no review.
|
|
|
|
|
| |
This reverts commit 99652fe553a1a5b0c551950e8178e867943a088f.
|
| |
|
| |
|
|
|
|
|
|
| |
Parse the contents of the package right away in the presentation
compiler. No review.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
anyone can offer any reason why it's not (long past) time to do this I
can back the truck up. (But I will have a list of bourne shell scripts
for you to write.)
With this commit:
1) -J options are now passed to the underlying JVM, along with -D
options which already were. scala -Dfoo=bar and scala -J-Dfoo=bar are
identical (but -J can pass arbitrary arguments to the jvm: -J-verbose,
-J-Xmx4G, etc.)
2) Eliminated DefinesSetting. It was ill-conceived because setting
system properties must be done at JVM start to guarantee they will be
seen where appropriate: by the time scala is involved it's too late. The
starter script takes care of routing -D to the jvm, and no longer sends
them along to scala as well. Since we have a new system package you can
read any property in system.props, like this:
% scala -Dp1="hi" -Dp2="bye" -e 'println(system.props filterKeys
(_.length == 2))' Map(p2 -> bye, p1 -> hi)
3) After measuring that startup is a full second faster by putting
the scala jars on the bootclasspath, I gave us a standard way to
take advantage of this. It's not done by default, although we should
seriously consider it (I'm familiar with the issues that have arisen in
the past.) Reclaim your life, one startup second at a time.
The flag is --usebootcp, as below:
// Here's a way (in bash 4) to compare repl startup times each way while
true ; do time pscala -i <(echo "system exit 0") ; done |& grep real
while true ; do time pscala --usebootcp -i <(echo "system exit 0") ;
done |& grep real
Once again I find myself unable to nominate any plausible reviewer (if
there were anyone interested in this stuff, they'd be doing it instead
of me) so no review.
|
|
|
|
|
|
| |
Hardened sigint handler against ctrl-C in the first few seconds of
startup. No review.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tired of trying to debug things like classpaths only to see output like
the following:
[search path for class files:
/System/classes/you/already/know:/Importan...]
I added a "do not truncate" mechanism to reporter and put it to use. Now
scala -verbose will let you in on those classpath secrets. No review.
|
|
|
|
|
|
| |
Don't transform patterns during superaccessors: the matcher can't deal
with funny trees. Closes #4062, review by dragos.
|
|
|
|
|
|
|
|
|
|
|
| |
The ability to interrupt repl execution without terminating the JVM has
snowballed a bit, but it's so handy that it's worth it. This commit
further encapsulates individual lines of execution such that they
can be managed after the signal comes in, and if necessary, forcibly
terminated. I'm straying into territory where I could use a really
Thread-knowledgeable reviewer: any volunteers? In the meantime, no
review.
|
|
|
|
|
|
|
| |
Moved ClassfileAnnotation/StaticAnnotation/Annotation/TypeConstraint
into scala.annotation and enabled the deprecated type aliases in scala.*
to point there. Also enclosed is a new starr to bootstrap. No review.
|
| |
|
|
|
|
|
|
|
|
| |
Cleaned up and brought up to date the help text for -X and -Y options.
Made some enhancements to PhasesSetting, which are documented if you
run scalac -X or -Y. (Try it!) Disabled some dead settings and renamed
others to reflect their current purpose. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mopping up after the deprecation of exit and error. It is decidedly
non-trivial (at least for the IDE-impaired) to be completely sure of
which error function was being called when there were about twenty with
the same signature in trunk and they are being variously inherited,
imported, shadowed, etc. So although I was careful, the possibility
exists that something is now calling a different "error" function than
before. Caveat programmer.
(And let's all make it our policy not to name anything "error" or "exit"
from here on out....) No review.
|
|
|
|
|
|
| |
Deprecated the rest of the elements with comments saying "deprecate me."
No review.
|
|
|
|
|
|
|
|
|
|
| |
Introducing scala.system, the product of a whirlwind couple of
hours. More useful stuff than you can shake three sticks at. See the
scala.system package object. It's even documented.
And since it has methods error and exit, proceeded to deprecate the ones
in Predef. No review.
|
|
|
|
|
|
|
|
|
| |
A foot in the door with Parsers/JavaParsers and Scanners/JavaScanners.
Recently clued in as to how this situation came to be, I now know
there's no reason not to start containing the damage. Also more work
on names: made a general method for transforming Trees into type-named
Trees and put it to work. No review.
|
|
|
|
|
|
|
| |
Some refactoring of genjvm trying to separate out some of the relatively
immutable logic from the parts more in flux, and slightly ease the
process of keeping separable things separate. Review by dragos.
|
|
|
|
|
|
| |
Segregated all the android related code in a new file and integrated it
with genjvm. Review by michelou.
|
|
|
|
|
|
|
|
| |
Fixes an inconsistency in primitive hashcode calculation. I did have a
test trying to spot exactly this situation, which says something about
either me or about testing or about me and testing. Closes #3957, no
review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A selection of collections additions from the lower end of the
controversy scale.
// TraversableOnce
def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
def maxBy[B](f: A => B)(implicit cmp: Ordering[B]): A
def minBy[B](f: A => B)(implicit cmp: Ordering[B]): A
// Iterator
def span(p: A => Boolean): (Iterator[A], Iterator[A])
// Traversable
def inits: Iterator[Repr]
def tails: Iterator[Repr]
def unzip3[A1, A2, A3](implicit asTriple: A => (A1, A2, A3)): (CC[A1], CC[A2], CC[A3])
// Sequences
def permutations: Iterator[Repr]
Review by odersky.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting the mopping up now that names have some more sense of their
place in the universe. Cleaned up some heavy multi-boolean logic. Added
more documentation on the relationships between entities in Symbols and
some other compiler things which often blur together.
Fun fact: the incorrect usage of nme.ScalaObject in Contexts which I
reported when first broaching the namespace subject became a compile
time error during the writing of this patch, because there is no longer
any such thing as nme.ScalaObject. It's a little bit like magic. No
review.
|