| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
complains about duplicate methods otherwise.
|
| |
|
| |
|
|
|
|
|
|
| |
And some tests for pending.
Closes SI-5358.
|
|
|
|
|
|
| |
Skolemization code doesn't belong in Typers. I carved
out a little place for it. Also simplifications in
specialization.
|
|
|
|
| |
The elision is now done by not emitting method calls (it was done by removing the elidable methods).
|
|
|
|
|
|
|
|
|
|
|
| |
While [@specialized A] already tries to include specialization,
a bug in specializedOn prevented this from happening: any empty
list could mean that the type var was unspecialized, or that it
was specialized on everything.
The fix is to have this function create the full list of symbols
in the case where the @specialized annotation doesn't explicitly
include any types.
|
|
|
|
|
|
| |
A reimagining of erik's patch in 1df4fc6e59 . He did the hard
part, this is the batman reboot. I added more tests and tried
to make the anyref caching code less fragile.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The basic problem here was that generic type params were getting
confused between the various specialized subclasses. For instance,
calling typeParamsSubAnyRef(A, C2$mcLI$sp) might return the wrong
specialized type param, e.g. C2$mcLZ$sp.A$sp (note the Z instead
of the I).
The fix is to cache with both the sym (A) and also the clazz
(C2$mcLI$sp). This may resolve a whole host of other obscure
AnyRef specialization problems.
|
| | |
| | |
| | |
| | | |
More trees created more uniformly.
|
| | | | |
| \ \ | |
|\ \ \ \
| |_|/ /
|/| | |
| | | | |
into develop
|
| | | |
| | | |
| | | |
| | | | |
Chain contexts by sharing the error buffer, unless you explicitly create a silent context. Review by @odersky
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of trying to track the fallback attempts we rely on the
context state to inform us which fallback is the last one.
setError cannot always be called in NoBestMethodAlternativeError
because inferMethodAlternative relies on side-effects.
Review by @paulp.
|
|\ \ \ |
|
| |/ / |
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Actually not a fix, only a workaround. Package objects strike
again: you don't want to have existentials in there, like this:
private val resolverFunction: PartialFunction[Throwable, Try[_]] = ...
There are a few irrelevant-to-that-bug changes included which I
did while debugging and figured I'd keep them. With this patch I
can merge/am merging the scala.concurrent work.
|
|/ /
| |
| |
| |
| |
| | |
Do cheap tests like x.isImplicit before expensive tests like
matchesQuantified. Don't fail to notice that substSym has been
called with an empty "from" list and traverse everything anyway.
|
|\ \ |
|
| | \ | |
| | \ | |
| |\ \ \
| | |_|/
| |/| |
| | | | |
'adriaanm/topic/virtpatmat', 'dcsobral/ticket/5439' and 'magarciaEPFL/cleanInliner' into develop
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
The same inlining decisions are made as before, see -Ylog:inliner, with a focus on lines starting with "[log inliner] Inlining"
review by @VladUreche @dragos @paulp
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
don't consider the matcherror-throwing catch-all case (generated by virtpatmat) a default case
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
catch handlers are now also translated by the virtualizing pattern matcher
emit type-based switches when possible, fallback to catch-all with full pattern match
(the logic used to emit constant-based switches was generalized to type-based switches,
abstracting out how to refer to the scrutinee and the shape of a default/catch-all case)
this was the last missing piece of essential functionality
now the virtualizing pattern matcher and the old one are mutually exclusive:
-Yvirtpatmat disables the old matcher logic completely
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
| |
At least for the value of fix which means "better than it was in
2.9." I accidentally spent a long while trying to fix something I didn't
realize I hadn't broken. But then I lucked into partially fixing it, so
that's good news.
See run/t5488-fn.scala if you want to see what still doesn't work.
(It's covered at SI-4770, which is now reopened.) Closes SI-5488.
|
|\ \
| | |
| | |
| | | |
'szabolcsberecz/synchronized-test' and 'non/si-5005-2' into develop
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the specialize phase removed FINAL from all specialized
methods, but left the @inline annotation alone, causing warnings. This
patch does two things:
1. It only removes final from the original class' methods which are
overridden, while leaving it on the specialized subclasses' methods.
2. When removing final, it also removes @inline, to prevent spurious
warnings.
This was intended to fix SI-5005, however there are deeper problems
which prevent inlining from working even with this fixed.
|
|\ \ |
|
| | \ | |
| | \ | |
| |\ \ \
| | |_|/
| |/| |
| | | | |
and 'scalamacros/pullrequest/multilineinterpolation' into develop
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously toolboxes used to typecheck their inputs before compiling.
Actually, the initial demo by Martin first typechecked the reified tree,
then ran it, which typechecked it again, and only then launched the
reflective compiler.
However, as observed in https://issues.scala-lang.org/browse/SI-5464
current implementation of typechecking is not always idempotent.
That's why we cannot allow inputs of toolboxes to be typechecked,
at least not until the aforementioned issue is closed.
This is not only a convention but also a check inside compileExpr.
|
| | |/ |
|
| | |
| | |
| | |
| | | |
This reverts commit 2b731911e97a281e324060099631e2374b2144ec.
|
|/ /
| |
| |
| | |
This reverts commit a725bf982c06e16c5d533ea6b2227b726db4f7e4.
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
An object in a subclass would silently override an inherited
method, then throw a CCE at runtime. I blamed this on matchesType
and altered it accordingly. There's a pretty extensive test case
which reflects my expectations. Review by @odersky please.
Closes SI-5429.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The crickets at http://www.scala-lang.org/node/11901 were in
unanimous agreement that I should proceed as suggested.
- No arguments to @specialize gets you 10/10, not 9/10
- Fixed bugs in AnyRef specialization revealed by trying to use it
- Specialized Function1 on AnyRef.
- Changed AnyRef specialization to use OBJECT_TAG, not TVAR_TAG.
- Deprecated SpecializableCompanion in favor of Specializable,
which has the virtue of being public so it can be referenced
from outside the library.
- Cooked up mechanism to group specializable types so we don't
have to repeat ourselves quite so much, and create a few groups
for illustrative purposes. I'm not too serious about those names
but I used up all my name-thinking-up brain for the day.
- Updated genprod and friends since I had to regenerate Function1.
- Put tests for a bunch of remaining specialization bugs in pending.
Closes SI-4740, SI-4770, SI-5267.
|
| |/
|/| |
|
| |
| |
| |
| | |
If this looks hacky, that's because it is.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Closes SI-5446.
I am morally certain that fixes of this nature could be
performed by someone who has logged fewer than ten thousand
hours with the compiler.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why is calling the error function not enough to register the error, why
does "setError(tree)" have to be called as well? That was the cause of
this particular stackoverflow. In ContextErrors I see lots of methods
which call setError and lots more which do not, and frankly it's all
pretty terrifying.
There is zero documentation attached to setError. Maybe there's an
explanation somewhere I'm not seeing.
Review by @hubertp.
|
| |
| |
| |
| |
| | |
Fix for trait/impl renaming in 5cbd7d06eb was incomplete.
Looks more complete now.
|
| |
| |
| |
| | |
Some day, outlawed!
|
| |
| |
| |
| | |
Review by @scalamacros.
|
|\ \ |
|