| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
I guess I have to suck up the "C with Object" here in order
to get the "Array[T with Object]" I need in a different test.
Now all tests pass for reals.
|
|
|
|
| |
And with that one, I believe all tests pass.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-- traits can extend Any, AnyRef, or AnyVal
-- classes can extend AnyRef or AnyVal but not Any.
This breaks reflection for the moment as it smuggles AnyVal so far
downstream that it's reflecting its way into bytecode (or something)
but the following test case goes five for six as anticipated.
trait Foo1 extends Any
trait Foo2 extends AnyVal
trait Foo3 extends AnyRef
class Bar1 extends Any // fail
@inline class Bar2 extends AnyVal
class Bar3 extends AnyRef
Eliminated various hijinx from definitions.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In a stunningly unusual demonstration of farsightedness,
I was able to generate these changes only by running:
scala scala.tools.nsc.util.FlagsUtilCompiler
With this much time in between runs:
-// Generated by mkFlagsTable() at Mon Oct 11 10:01:09 PDT 2010
+// Generated by mkFlagsTable() at Thu Feb 02 20:31:52 PST 2012
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
determine match strategy by typing `__match`
factored out the interface to generate code in this monad, cleaned up codegen a bit
no longer solving a context bound to determine the match strategy and the monad's type constructor
it's too expensive
don't consider implicits looking for __match
implicit search causes HUGE slowdowns -- now the overhead is about 4% compared to just assuming there's no __match in scope
to support virtualization&staging, we use the type of `__match.one` as the prototype for how to wrap "pure" types and types "in the monad"
pure types T are wrapped as P[T], and T goes into the monad as M[T], if one is defined as:
def one[T](x: P[T]): M[T]
for staging, P will typically be the Rep type constructor, and type M[T] = Rep[Option[T]]
furthermore, naive codegen no longer supplies type information -- type inference will have to work it out
optimized codegen still does, of course, and that's enough since we only bootstrap that way
TODO: improve the test (currently the condition is not represented)
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
More specifically:
* Importers now preserve wasEmpty and original
* ToolBoxes no longer auto-evaluate nullary functions returned by runExpr
* All local symbols from previous typechecks are now correctly erased by ResetAttrs
* Originals are now reified
|
| |\ \
| | | |
| | | |
| | | | |
'scalamacros/pullrequest/5256' into develop
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reflection now correctly processes classes, objects and inner classes
that are declared in classes and objects.
However classToType still crashes on compound types and local classes.
For more information on those, follow the links:
* Compound types: https://issues.scala-lang.org/browse/SI-5430
* Local classes: https://issues.scala-lang.org/browse/SI-5431
Fixes https://issues.scala-lang.org/browse/SI-5256.
Review by @paulp, @odersky.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Importers now correctly process constants that carry types and symbols.
However, it is still impossible to reify classOf for a class/trait that
is defined inside a quasiquote.
Theoretically, this can be implemented, but will require attaching
original trees to classOf constants, which needs much more effort.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The scanner performs some sketchy heuristics when it sees an ascii 1A
since it may be EOF or it may be part of a literal. Due to this, it
failed to detect an unterminated string literal if the opening quote was
unicode-escaped, leading to memory exhaustion as it read SUs until the
universe ended.
We're parsing a fixed input with known length! There's no reason to be
guessing about whether a char is EOF. If we're at the end of the file,
it's the end of file. Otherwise, it is not the end of the file.
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
'scalamacros/pullrequest/5427' and 'scalamacros/pullrequest/5423' into develop
|
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Default getter for annotations doesn't perform initialization, hence
we've faced the following bug: https://issues.scala-lang.org/browse/SI-5423.
One of the approaches to fixing it would be to auto-complete on getter,
but according to Martin we'd better not do that because of cycles.
That's why I'm just introducing a new, eager, variation of `annotations'
and redirecting public API to it.
Review by @odersky.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added a bunch of tests that cover changes related
to switches that were applied to Yvirtpatmat
implementation.
Note: I didn't add those tests progressively because
my changes fix trees after typer phase but do not
affect resulting bytecode. How come? It's because
-Yvirtpatmat will emit pattern for switches and then
the old pattern matcher implementation would transform
them in the old fashion in explicitouter. We cannot
disable the old pattern matcher in explicitouter yet
because it doesn't handle patterns used for catching
exceptions.
Thus, consider this as a sign of the fact that Yvirtpatmat
is still work in progress.
|
| |/ /
| | |
| | |
| | |
| | | |
Negative "to" index should be normalized to 0 before using it
in a difference operation.
|
| | | |
|
| |/
| |
| |
| |
| | |
Utilize knowledge of case class synthetic equals to rule out
some comparisons statically. Closes SI-5426.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fail compile if AnyVal is inherited by a trait, a non-@inline
class, or a class with an AnyRef parent somewhere. Added tests.
Added logging, like
[log extmethods] Inline class class Bippy spawns extension method.
Old: def getClass: Class[_ <: Bippy]
New: final def extension$getClass($this: Bippy): Class[_ <: Bippy]
Fixed what I hope was a bug in ExtensionMethods where the original
method params were dropped.
Since adding a NonNull parent was also inflicting an AnyRef on AnyVal
subclasses, suppressed that for those. Had the bright idea that AnyVal
could extend NotNull. It doesn't seem to accomplish much, but then,
I don't think NotNull accomplishes much. Still, maybe it's time to
restrict the ways one can use AnyVal so one can't do this:
scala> var x: AnyVal = _
x: AnyVal = null
|
| | |
|
|\ \ |
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| | | | |
| | \ | |
| |\ \ \
| | | | |
| | | | |
| | | | | |
'hubertp/ticket/4336' into develop
|
| | |/ /
| | | |
| | | |
| | | | |
Some of the type params might already be instantiated if explicit type application is done. Review by @adriaanm
|
| |\ \ \
| | |/ /
| |/| | |
AvlTree performance improvements
|
| | | | |
|
|\| | |
| |_|/
|/| |
| | |
| | | |
Conflicts:
src/compiler/scala/reflect/internal/Definitions.scala
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Temporarily removed getClass from AnyVal to get build going.
Disabled anyval-childen test.
Fixed some other build problems.
Implemented step 1 + 2 of inline classes proposal.
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
Hacks here and there to allow them to survive at least
to erasure. Since nothing is done with them there yet, they
inevitably crash and burn a little ways beyond that.
|
| | | |
|
| | | | |
| | \ | |
| |\ \ \
| |/ / /
|/| | |
| | | | |
'axel22/feature/immutable-thread-safe' into develop
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is part of an effort to make the immutable collections
(more) thread safe. The `::` still has non-final member fields
for head and tail, but there is not much that can be done right
now about that, since these fields are used by list buffers.
Tried writing a test with unsafe initialization, but could not
invent a scenario which actually fails, at least on the JDK6.
|
| | |
| | |
| | |
| | |
| | | |
The benchmarks charts are confusing me and I want to rule it out
as a problem by not having it exist for a while.
|
|/ /
| |
| |
| |
| |
| | |
"Induced" but not in my estimation "caused". Would like to understand
why the enclosed test case crashes under -optimise without this change
to AddInterfaces.
|
| | | |
| \ | |
|\ \ \
| | | |
| | | |
| | | | |
into develop
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Changed CompositeThrowable to inherit Exception instead of Throwable.
A few minor fixes for the jdk1.5 parallel collection tasks.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is done by structurally serializing list nodes, but prepending a special
`ListSerializationStart` symbol ahead of the list. If this symbol is not
in the object input stream, the deserialization reverts to the old mode.
Note there is not much to be done for list buffers - their serialization was
broken before, so legacy serialized list buffers are no longer deserializable.
However, their serialVersionUID was changed to reflect this, so deserializing
a legacy list buffer should fail fast.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/compiler/scala/reflect/internal/Symbols.scala
src/compiler/scala/reflect/internal/Types.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/library/scala/reflect/api/Trees.scala
|
| | | | |
| | | | |
| | | | |
| | | | | |
The idea is that all operations that need to be synchronized are overriden in classes reflect.runtime.Synchronized*. Sometimes this applies to operations defined in SymbolTable, which can be directly overridden. Sometimes it is more convenient to generate SynchronizedClazz subclasses of SymbolTable classes Clazz. In the latter case, all instance creation must go over factory methods that can be overridden in the Synchronized traits.
|