| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Some html stripping in explicitouter because I stubbed my toe on some
angle brackets. No review.
|
|
|
|
|
|
|
| |
meaningful name inside the pattern matcher. Created a tracker for
TRANS_FLAG which could enforce the transience it promises us, but didn't
turn it on. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generalizes catch blocks to include any PartialFunction[Throwable, T].
Existing catch blocks will compile exactly as before. Anything else
(which mean: the token after CATCH is not a left brace, or it is a left
brace not immediately followed by CASE) is desugared as follows:
try body catch expr
// becomes
try body
catch { case x =>
val catchFn = expr
if (catchFn isDefinedAt x) catchFn(x)
else throw x
}
Review by odersky.
|
|
|
|
|
|
| |
Restore id adapt for phases after refChecked (and fix Eclipse builder as
a side effect). Try to fix sbt build. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TermName and TypeName are exposed throughout the compiler based on what
kind of name a given abstraction ought to have. (There remain places
where one needs to create a name without knowing yet what it will be,
and those will always be Names.)
The nme object in the compiler now holds only term names. To reference a
known type name, use tpnme:
nme.List == ("List": TermName)
tpnme.List == ("List": TypeName)
The contents of nme and tpname are defined in traits, many of which
are shared, so if a name should exist only as a Type and not a
Term, it should be defined in CompilerTypeNames, but otherwise in
CompilerTermNames or CompilerCommonNames. This is partially complete but
I'm sure there are still many shared which should pick a side.
Usage of .toTermName and .toTypeName is strongly discouraged. After the
dust has settled, there will be very few places where it will make sense
to hop between namespaces like that.
There are some implicits to smooth everything out, most of which should
be removable eventually.
// these two are in no hurry to go anywhere
String => TermName
String => TypeName
// but not String => Name: def view in the compiler is no longer implicit
// these two are temporary, and can log when they kick off to help us
flush // out remaining issues of "name migration" Name => TermName
Name => TypeName
There is more work to be done before we're properly protected from
naming errors, but I will not allow another eight hour tragedy to befall
lukas or anyone else!
Review by rytz. (Formality.)
|
| |
|
|
|
|
|
|
|
|
| |
In r23627 Lukas fixed specialization bug that seemed to be the reason
for #3993 and other specialization and resident compiler bugs. So
reverting quick fix r23576 as it is not necessary anymore. No review.
Closes #3993.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Some cruft which finally got on my nerves enough to decruft. No more
getClass2 and getModule2 uses in Definitions, since that transition was
completed in the time of my grandpappy. (The implementations remain,
quiescent.) No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A patch authored by martin to fix one of the big outstanding issues with
-Ycheck. The typer had a vision of the world which fell to pieces if
presented with a tree from after phase constructors. Now it is wiser:
perhaps a bit sadder as well, but every typer must face this day sooner
or later.
Also removed the various passing tests from test/checker-tests, but
still plenty of fascinating failures in there for anyone interested in
helping push to the finish line! No review.
|
|
|
|
|
|
|
|
|
|
| |
warnings. Fixed some bugs revealed by said warnings, and made some minor
changes to avoid warnings. (Technically it's not a bug to have unrelated
classes compare as equal, but it so often is a bug that it behooves us
not to do it intentionally so the warnings stand out.) Disabled the most
useful warning for the moment since it'd be wrong with some frequency.
No review.
|
|
|
|
|
|
| |
Taking retronym's advice on increasing UniversalFn transparency. No
review.
|
|
|
|
|
|
|
| |
Parser relaxation so that one can name the type variables in a
constructor pattern match: this is a prerequisite to realizing the full
potential of gadts. (Nothing new works here however.) No review.
|
|
|
|
|
|
|
| |
Found several minor thigns wrong with checkSensible, which tries to
issue warnings for comparisons which will always be true or false. No
review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecated the @serializable annotation, introduce a new trait
"scala.Serializable" which has to be extended instead (cross-platform).
Known issues:
- Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard).
- Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice"
- Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?)
Note that @SerialVersionUID continues to be an annotation; it generates
a static field, which is not possible otherwise in scala.
Review by dragos, extempore.
Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test
for "JavaSerializableClass"? Is that correct?
|
|
|
|
|
|
|
| |
It looks like the fix for #2318 was causing problems, so I gave it some
more graceful failure. Leaving #2318 open because the implementation
could still work harder to find the right method. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"I invite everyone to change this rule, and observe what breaks!"
This much beloved comment from #1208 has been on my radar for two years.
The worm has turned. Closes #1208. The inferred type of an object is now
Foo.type instead of "object Foo". What once was this:
scala> val x: Map[Int, Singleton] = Map(1 -> None)
<console>:5: error: type mismatch;
found : (Int, object None)
required: (Int, Singleton)
Now exudes a pleasing aura of workingness:
scala> val x: Map[Int, Singleton] = Map(1 -> None)
x: Map[Int,Singleton] = Map(1 -> None)
No review.
|
| |
|
|
|
|
|
|
| |
Did some more polishing on the infamous partial function error message.
No review.
|
|
|
|
|
|
| |
Moved sigint handler to InterpreterLoop and made it discriminate based
on contents of current line. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fleshed out the mock code a little further so it's easy for closures to
become SAMs.
// implicit not necessary, but improves fun factor
scala> implicit def mkUFn(x: AnyRef) = scala.tools.reflect.UniversalFn(x)
mkUFn: (x: AnyRef)scala.tools.reflect.UniversalFn
scala> (() => 5*5*5).as[java.util.concurrent.Callable[Int]]
res1: java.util.concurrent.Callable[Int] = <function1>
scala> res1.call
res2: Int = 125
No review.
|
|
|
|
|
|
| |
Some hardening of the repl's internals extracted from a more interesting
patch in progress. No review.
|
|
|
|
|
|
| |
Some cleanups in the *Runners and a few compiler I/O conveniences. No
review.
|
|
|
|
|
|
|
| |
Temporarily disabled varargs annotation on constructors.
No review.
|
|
|
|
|
|
| |
Some work on error messages, somewhat based on ideas in #3092. No
review.
|
|
|
|
|
|
| |
Seeing if I can unbreak things without actually removing the visible
motivation for the whole exercise. No review.
|
|
|
|
|
|
|
| |
Making the installation of the repl sigint handler take place less
eagerly. And more relevantly to recent hangs, made the repl only create
daemon threads. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A new totally safe signal manager, along with all the support code
needed for that. See the classes in scala.tools.reflect.* for
interesting new weapons. Also includes inaugural handy usage:
scala> val x = 10
x: Int = 10
scala> while (true) ()
[ctrl-C]
Execution interrupted by signal.
scala> x
res1: Int = 10
No review, but feedback welcome.
|
| |
|
|
|
|
|
|
| |
I keep forgeting which phase the browser is currently showing, so added
phase name. No review
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
| |
In the absence of known reasons why some exceptions are intercepted or
have their stack trace printed and others fly unchallenged, changed
script and object runners to handle everything consistently when an
exception is thrown. Closes #3978 again, no review.
|
|
|
|
|
|
| |
Temporarily reverted sun.misc.* using code until reflective version is
complete. No review.
|
|
|
|
|
| |
Review by Rytz.
|
|
|
|
|
|
|
|
|
| |
Changing EnclosingMethod generation not to drop the trailing $ from the
name of the container class. I'm sure this was done for some reason but
proguard objects rather strenuously (and fails) because it can't find
the method, since it says it's in the class but is really in the object.
Review by dragos.
|