| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a type var's constraint now also tracks whether the type var was
compared to a stable type
if it was, we probably shouldn't widen the type argument that's inferred
for this var, as the result will surely fail to type check
NOTE: must be enabled using -Xexperimental
review by extempore
|
|
|
|
|
|
|
|
|
|
|
|
| |
can't believe I missed that one...
closes SI-5033
more complete test case to make sure the multi-arglist case works as
well
no review
|
|
|
|
|
|
|
|
|
|
| |
for now, left the old if(settings.YdepMethTpes.value) guards in comments
removed *.flags containing -Ydependent-method-types also updated one
check file with one fewer error
no review
|
|
|
|
|
|
|
|
|
|
|
| |
however, it must be possible to inline Ensuring, ArrowAssoc methods
renamed the public val x to something a little less intrusive
fixed check file to reflect better error message (see! it wasn't that uncommon for people to write `foo.x` -- NEWS AT ELEVEN)
no review
|
|
|
|
|
|
| |
Notice when a typeref's info creates an obvious cycle, so we can see an
error instead of a stack overflow. Closes SI-5093, review by moors.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
true == new java.lang.Boolean(true) will in fact sometimes be true. Also
fixes a bug caused by this change in r23627.
- lazy val SerializableClass = getClass(sn.Serializable)
+ lazy val SerializableClass = getClass("scala.Serializable")
It used to be java.io.Serializable. Hey, let's not change the meaning of
existing symbols which are in active use. 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.
|
| |
|
|
|
|
|
| |
Closes SI-5078, no review.
|
|
|
|
|
|
|
|
|
| |
Pulling back from expensive path normalization caused a regression where
companions were no longer recognized as such after specialization.
(Specifically, the paths turned up as "test.scala" and "./test.scala".)
I made it a two-level check, doing the expensive one before failing.
Closes SI-5023, no review.
|
|
|
|
|
|
| |
I verified this creates identical library bytecode so I anticipate no
regressions. Review by prokopec anyway.
|
|
|
|
|
|
|
|
| |
When many methods are missing, print a list of signatures the way they
need to be implemented, and throw in ??? stub implementations so it
should be compilable code. If anyone would like this logic exposed more
generally (for the IDE or whatever) just let me know. No review.
|
|
|
|
|
| |
Reverted r25823 as it breaks specialization of traits.
|
|
|
|
|
|
| |
Don't require a tableswitch if the matcher elected not to emit one
because there were so few cases. No review.
|
|
|
|
|
| |
Closes SI-5071, review by prokopec.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It took me a long time to find a trivial error while adjusting the
annotation packages, so I spent even longer trying to make sure next
time it would take me less time. It's the usual business of eliminating
duplication and unnecessary indirection.
Behavioral note: there was no consistency or deducible reasoning
regarding when annotation checks would be performed against the
typeSymbol directly (thus excluding annotation subclasses) or when they
would do a subclass check. I saw no reason it shouldn't always be a
subclass check; if the annotation isn't supposed to be subclassed it
should be final, and if it is, then the subclasses had probably better
not stop exhibiting the behavior of the base class.
Example: this now draws deprecated warnings, but did not before.
class bippy extends deprecated("hi mom", "burma shave")
@bippy def f = 5
(The deprecation message isn't printed so we're not there yet, but
closer.)
There is some new internal documentation on annotations, sadly lacking
in my famous ascii diagrams, and some new conveniences. Review by rytz.
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
One's devotion to aesthetics must not be allowed to trump one's
commitment to clearly delineated tuplehood. Closes SI-5067, no review.
|
|
|
|
|
| |
See SI-5060. Review by odersky.
|
| |
|
|
|
|
|
|
| |
Did something eat some whitespace? I don't know. This is almost the same
commit as r25783, but with different whitespace. No review.
|
|
|
|
|
|
| |
Until I have a second to figure out how a checkfile whose contents are
*recorded from running the test case* can fail to match. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hard to believe a bug like this can exist this long. Cay Horstman showed
me.
// Hey, where's my eacute?
scala> <city name="San José"/>.attributes foreach println
name="San Jos&;"
No review.
|
|
|
|
|
|
|
|
| |
The comment in SyntheticMethods and the comment in the serialization
test said exactly opposite things. The logic at work all seems to be
invalid anyway since nested objects are not treated like lazy vals, they
have no bitmap. Serialize everything serializable. Review by plocinic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old Man Reflection is coming home and he's not going to like finding
out a bunch of beans have moved into his reflecting room. We had better
evict those guys before he blows his stack.
scala.reflect.*Bean* --> scala.beans.*
scala.beans, that's kind of a fancy package name for some beans. I
figure it's time to start fishing or cutting bait on this kind of thing.
I don't even know what beans are, but if we're going to have them in the
mainline, the least surprising place to find them is scala.beans. If we
don't want to put them in scala.beans for whatever reason, then I say
they don't belong in trunk at all.
Bonus round:
scala.annotation.target --> scala.beans.meta
I don't know if there is any more unfortunate name for a package
possible than "target". Maybe ".svn" or ".git" if you could have dots
in package names. Package CVS wouldn't hit too hard these days. Package
lib_managed? I'll try to come up with something. In any case this golden
opportunity could not be squandered.
There is a new starr included, because GenJVM contains all kinds of
shooting-from-the-hip Bean-related name hardcoding. (Yes, still. I ran
out of stones. So a few birds escape with their lives... this time.)
|
| |
|
|
|
|
|
|
|
|
|
| |
It's nice when you can delete such absurd complication by figuring out
how to avoid it in the first place.
Also includes some Namer cleanup as I tried to follow the logic involved
to fix a protected[this] accessor bug. No review.
|
|
|
|
|
|
| |
Following Paul's detective work, fixed Java class loading in reflection.
Moved test code.scala into checkin build. Yay!
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
Closes SI-4319, no review.
|
|
|
|
|
| |
Fixes corner case diagnosed by miguel. Closes SI-5012, no review.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
|
|
|
| |
During the generation of the specialized method implementation, local
lazy vals in specialized classes were getting duplicated and assigned
new (different) names. Also, the identifiers referring to them were not
getting updated. This is fixed now. Further, the mutable flag is no
longer getting set for a lazy val during method body duplication.
Review by Dragos.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added an "Abstract" method info to the specialized phase, which denotes
that no implementation should be generated.
Previously:
trait A[@specialized(Boolean) T] {
def foo: T
}
used to generate:
trait A$mcZ$sp extends A[Boolean] {
def foo$mcZ$sp = this.foo
}
which caused cyclic calls because of linearization rules when several
traits are mixed together. Now, the following is generated:
trait A$mcZ$sp extends A[Boolean] {
def foo$mcZ$sp: Boolean
}
Review by dragos.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current design of error trees complicates the design of reflection
library, and introduces sometimes unnecessary boilerplate and since I
do not want to stall that work I am reverting all the changes related
to error trees. A different design is currently under consideration but
work will be done on separate branch on github.
Revisions that got reverted:
r25705, r25704 (partially), r25673, r25669, r25649, r25644, r25621, r25620, r25619
Review by odersky and extempore.
|
|
|
|
|
|
|
| |
It was time. Removed unused flags and devirtualize detritus. Cleaned up
flags a bit further. Fixed the contents of phaseNewFlags in those places
where it was inaccurate. No review.
|
|
|
|
|
|
| |
Changes to Liftcode to use new reflection semantics, where a compiler
uses type checking.
|