| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
No review.
|
|
|
|
|
|
| |
First end-to-end implementation of a runtime reflexive compiler that
generates and loads bytecodes. Review by szeiger.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This has been failing the Xcheckinit build for weeks and is now failing
the regular build too. I'm checking in some hairy stuff and I'd like to
make a good impression on it. Review by odersky.
|
|
|
|
|
|
|
|
|
| |
at least one imminent TODO: undo hardwired generation of if/then/else,
and decide based on type whether to call flatMap/orElse or inline those
methods from Option
review by extempore
|
|
|
|
|
|
|
| |
Impressed at the amount of ticket traffic for an unadvertised internal
method. All the more reason to work toward that support repl API. Don't
worry, it'll come. Closes SI-4899, no review.
|
|
|
|
|
|
|
|
| |
Don't mark shutdown hooks as daemon threads, although it does not seem
to make any difference. Instead have the code which waits for all
threads to be complete be smarted about which codes to monitor. No
review.
|
|
|
|
|
|
|
|
|
|
|
| |
An interesting bug during cleanup: runtime checks on the target of a
structural invocation duplicated the selection without regard for the
fact that it might be an expression. So if the name of the method being
invoked allowed the possibility that the target was a primitive type
(such as "toInt") the expression would be evaluated three times.
Closes SI-5080, no review.
|
|
|
|
|
|
| |
I verified this creates identical library bytecode so I anticipate no
regressions. Review by prokopec anyway.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(T*)U now eta-expands to Seq[T] => U, not T* => U. There is a transition
command line switch to get the old behavior for any who may have relied
upon it:
-Yeta-expand-keeps-star
Closes SI-4176, no review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Important note for busy commit log skimmers ***
Symbol method "fullName" has been trying to serve the dual role of "how
to print a symbol" and "how to find a class file." It cannot serve both
these roles simultaneously, primarily because of package objects but
other little things as well. Since in the majority of situations we want
the one which corresponds to the idealized scala world, not the grubby
bytecode, I went with that for fullName. When you require the path to a
class (e.g. you are calling Class.forName) you should use javaClassName.
package foo { package object bar { class Bippy } }
If sym is Bippy's symbol, then
sym.fullName == foo.bar.Bippy
sym.javaClassName == foo.bar.package.Bippy
*** End important note ***
There are many situations where we (until now) forewent revealing
everything we knew about a type mismatch. For instance, this isn't very
helpful of scalac (at least in those more common cases where you didn't
define type X on the previous repl line.)
scala> type X = Int
defined type alias X
scala> def f(x: X): Byte = x
<console>:8: error: type mismatch;
found : X
required: Byte
def f(x: X): Byte = x
^
Now it says:
found : X
(which expands to) Int
required: Byte
def f(x: X): Byte = x
^
In addition I rearchitected a number of methods involving:
- finding a symbol's owner
- calculating a symbol's name
- determining whether to print a prefix
No review.
|
|
|
|
|
|
| |
Following Paul's detective work, fixed Java class loading in reflection.
Moved test code.scala into checkin build. Yay!
|
|
|
|
|
|
| |
More sensible use of MathContext, plus some BigDecimal tests.
Contributed by Erik Osheim. Closes SI-4981, no review.
|
|
|
|
|
|
|
| |
The size map size computation for parallel hash sets was invalid.
No review.
|
|
|
|
|
|
|
| |
Adds Growable and Shrinkable to parallel maps and sets.
No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Finished giving case classes a ProductN parent, and flipped it on. The
"finish" part involved not breaking existing code where case classes
manually extend the appropriate ProductN. (Like, Tuple 1-22.)
- Generalized most of SyntheticMethods to ease method creation and class
manipulation in general.
- Fixed bugs related to the above, like the fact that this used to be a
compile error:
scala> case class Foo() extends Serializable
<console>:28: error: trait Serializable is inherited twice
case class Foo() extends Serializable
^
It feels like there's a better way to eliminate the duplicate parents,
but after spending a lot of time chasing my tail in that peril-fraught
zone between namer and typer, I don't see an easy path to improve on
it. Closes SI-1799. For that modification to Typers, review by odersky.
|
|
|
|
|
| |
Fix for bumpy proxy equals. Closes SI-4807, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Formerly a specializable type parameter would be missed if in an
intersection.
trait Trait[@specialized T] {
def f[T](x: Foo[T] with Bar) = x
}
Now that is specialized, as it already was in the "Foo[T]" case. Closes
SI-4794, no review.
|
|
|
|
|
|
|
|
| |
Offer warning when demonstrably non-side-effecting expressions appear in
statement position, which should be unintentional by definition. Threw
in removal of six places with useless discarded expressions which the
warning informed me about. No review.
|
| |
|
| |
|
|
|
|
|
| |
Sorting test output so it passes on java7, no review.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Created infrastructure for testing icode + settings/partest yak shaving.
See enclosed test files/run/inline-ex-handlers.scala. To compare
optimized and unoptimized icode after a given phase, all you need in a
partest source file is this:
import scala.tools.partest.IcodeTest
object Test extends IcodeTest {
override def printIcodeAfterPhase = "inlineExceptionHandlers"
}
Other things can be done, see IcodeTest.scala. Review by ureche.
|
|
|
|
|
|
| |
Bug in optimizer eliminated potentially exceptional not-dead code.
Streamlined isSideEffecting logic. Review by ureche.
|
|
|
|
|
|
| |
[recommit] Backend optimization: Inline exception handlers. Review by
dragos.
|
|
|
|
|
|
|
| |
Removing the code which has been deprecated since 2.8.0. Contributed by
Simon Ochsenreither, although deleting code is such fun one hesitates to
call it a contribution. Still, we will. Closes SI-4860, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reversed the values of "is" and "is not" in recent for comprehension
deprecation.
DO NOT BLOW HATCH
REPEAT
DO NOT BLOW HATCH
"Roger! Hatch blown."
Events reveal it was all baby, no bathwater. It turns out that the
specification is merely a document, not infallible holy writ as we
had all previously believed. So it is not the ABSENCE of val in a for
comprehension assignment which is deprecated, it is the PRESENCE of val.
Summarizing again, more accurately perhaps:
for (x <- 1 to 5 ; y = x) yield x+y // THAT's the one
for (val x <- 1 to 5 ; y = x) yield x+y // fail
for (val x <- 1 to 5 ; val y = x) yield x+y // fail
for (x <- 1 to 5 ; val y = x) yield x+y // deprecated
No review.
|
|
|
|
|
|
| |
Optimizations for Seq's implementations of sequence search algorithms.
Contributed by Rex Kerr. Closes SI-4828, no review.
|
|
|
|
|
|
|
| |
have lived through before: java5 wrongly prints "volatile" next to
bridge methods, because ACC_BRIDGE uses the same bit as ACC_VOLATILE.
Result: partest failure! No review.
|
|
|
|
|
|
| |
Fix java signature generation for traits: no classes as parents. Closes
SI-4891, review by grek.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't discard deprecation/unchecked warnings regardless of settings.
Changed warnings code to accumulate them rather than thoughtlessly
discarding them and issuing its well-known taunt. In the repl you can
take advantage of this with the :warnings command, which will show the
suppressed warnings from the last line which had any. Be advised that at
the moment it has some issues: unchecked warnings aren't making it out,
and near repl startup neither are deprecation warnings, so don't open a
bunch of tickets please.
References SI-4594, no review.
|
|
|
|
|
|
|
| |
Fixing all the tests and source which still use the old for
comprehension syntax with vals where there are no vals and no vals where
there are vals. No review.
|
|
|
|
|
|
|
|
|
|
| |
Fix for a bug in CharArrayReader which made triple quoted strings
fail to parse sometimes. Note: when the temptation strikes to adjust
for special cases by letting the regular case happen and subsequently
attempting to fix the ball of mutation by selectively applying what
seems like the inverse operation, please consider the possibility that
this is not the optimal approach. Closes SI-4785, no review.
|
|
|
|
|
|
|
|
| |
Fixed bug in the disambiguation of f(foo='bar') style method calls in
the presence of overloading, parameterization, and by-name arguments.
Took the opportunity to clean things up a little bit. Closes SI-4592,
review by rytz.
|
|
|
|
|
|
|
|
| |
LiftCode works again, now integrated with new reflection library.
Other changes: def Literal(x: Any) has been deprecated, and all its uses removed.
Modifiers has lost positions as fourth case class argument; is now a field, mirroring Tree.pos (this removes junk in patterns and makes reification simpler). Review by extempore.
|
|
|
|
|
|
| |
Disabled all the old scala.reflect._ tests which are now crash-failing,
no review.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Test case closes SI-4172 - I think the output is right anyway - review by rytz.
|
|
|
|
|
|
| |
"Freed the lisp test." Tweaked partest defaults a little in the hopes
that seth tisue is correct in his analysis. No review.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Contributed by Daniel C. Sobral.
|