| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-5330, SI-6014 deal with existential self-type
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This has been broken since https://github.com/scala/scala/commit/b7b81ca2#L0L567.
The existential rash is treated in a similar manner as in fc24db4c.
Conceptually, the fix would be `def selfTypeSkolemized =
widen.skolemizeExistential.narrow`, but simply widening before
narrowing achieves the same thing. Since we're in existential voodoo
territory, let's go for the minimal fix: replacing `this.narrow` by
`widen.narrow`.
--
Original patch by @retronym in #1074, refined by @paulp to
only perform widen.narrow incantation if there are
existentials present in the widened type, as
narrowing is expensive when the type is not a singleton.
The result is that compiling the entirety of quick, that
code path is hit only 143 times. All the other calls hit
.narrow directly as before. It looks like the definition
of negligible in the diff of -Ystatistics when compiling
src/library/scala/collection:
< #symbols : 306315
---
> #symbols : 306320
12c13
< #unique types : 293859
---
> #unique types : 293865
I'm assuming based on the 2/1000ths of a percent increase
in symbol and type creation that wall clock is manageable,
but I didn't measure it.
|
|\ \
| |/
|/| |
sane printing of renamed imports
|
| |
| |
| |
| |
| | |
Having a select named "foo" with an underlying symbol named "bar"
and trying to make sense of all that by prettyprinting is very confusing
|
|\ \
| | |
| | | |
SI-6539 Annotation for methods unfit for post-typer ASTs
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Don't default the message, and show it exclusively.
- Fix cut-and-pasto in the @since tag
- Be tolerant if the annotaion class is missing, as seems to
have been the case compiling the continuations plugin.
- s/\t/ / in the test file to show the errors are positioned
correctly.
- Use defensive getOrElse
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Motivated by the `.value` method in the SBT task-syntax branch,
which should only be called within the context of the argument
to a setting initialization macro.
The facility is akin to a fatal deprecation.
|
|\ \
| |/
|/| |
SI-6616 Check that unsafe operations are only called on the presentation...
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
compiler thread.
The method that checks the actual constraint is @elidable, expecting it to be used
for nightly builds but stripped-off in release builds. This way we don't lose any
performance, but 'fail-fast' in IDE nightlies.
This assumes that release builds will have at least `-Xelide-below ASSERTION`, but
this pull request does not do that.
|
|\ \
| |/
|/| |
|
| |\
| | |
| | | |
Fixes example in Type.asSeenFrom
|
| | |
| | |
| | |
| | |
| | |
| | | |
It was written in some form of non-executable pseudo-code before and
that might be quite confusing for people who are not familiar with scala
reflection.
|
| |\ \
| | |/
| |/| |
Updated copyright dates throughout compiler and stdlib for upcoming release
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
e6b4204604 moved access widenings from ExplicitOuter to
SuperAccessors to reflect them in pickled signatures so
that the inliner can take advantage of them under separate
compilation.
The followup discussion [1] determined that this wasn't
the right solution: while it enabled new separate compilation
inlinings, it failed to widen access of outer pointers and
hence prevented certain inlinings.
A better solution was proposed: modify the inliner to know
that access widening is guaranteed to have happened in
ExplicitOuter for any field accessed by an @inline-d method
body, rather than relying solely on the pickled types.
But this hasn't happened yet. In the meantime 07f94297 / #1121
reinstated the access widening to SuperAccessors, but took a
slightly different approach, using `Symbol#enclMethod` rather
than `closestEnclMethod`. That deviation triggers SI-6562.
This commit goes back to `closestEnclMethod`.
[1] https://groups.google.com/forum/#!topic/scala-internals/iPkMCygzws4
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
- Added the labels across scala.reflect and scala.reflect.macros
- Added the styling in template.css that is used by all labels
|
| |/
| |
| |
| | |
reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later
|
| |
| |
| |
| |
| |
| |
| | |
Previous fix to value classes uncovered some questionable cases in the backend where result types of constructor signatures are surprising. It's not a big deal because these types will be ignored afterwards anyway. But
the method uncovered some questionable situations which we should follow up on. However, breaking 2.9 code because of this is way too harsh. That's why the asserts were converted to warnings.
review by @paulp, @adriaanm
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# By Jason Zaugg (5) and others
# Via Josh Suereth (5) and others
* origin/2.10.0-wip:
Use Typed rather than .setType
Wider use and a new variant of typedPos.
SI-6575 Plug inference leak of AbstractPartialFun
Disabled generation of _1, _2, etc. methods.
SI-6526 Additional test case.
Fix SI-6552, regression with self types.
avoid single-art assert where harmful in duration-tck
Fix for SI-6537, inaccurate unchecked warning.
SI-6526 Tail call elimination should descend deeper.
Changes Tree and Type members from vals to defs.
Fixes SI-6170: issue with dragging scaladoc splitter over central iframe
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In 6eb55d4b7a we put in a remedy for an old issue SI-4560 which
had accumulated a number of sketchy partial remedies which carried
no tests to illustrate their necessity. Looks like at least one of
those was doing something useful. Here's to reversion-reversion.
This reverts commit c8bdf199, which itself reverted cb4fd6582.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Explanatory email:
The reflection API defines a great many abstract vals. I would
like these all to be defs. I'm sending a pull request to that end.
Reasons: for starters, they should default to being defs. It's a
decision to use vals for which one should have to supply reasons.
The reason for THAT is that defs can be implemented with vals, but
not vice versa.
Why does this matter? I can't find my long writing on the subject
of TypeRef. In short, we waste a huge amount of memory on its
fields, because given the way TypeRef is defined, each one demands
a pre, a sym, and an args. Except that somewhere between 1/3 and
1/2 have prefix "NoPrefix", and somewhere between 1/3 and 1/2 have
args "Nil". We know it at creation time, but we give every typeref
the whole field anyway.
At present there's no way to fix this which has acceptable
performance - i.e. custom subclasses save us lots of memory, but
are too much slower for having to use an extractor - but there's
no reason we should have to choose, and I fully expect to fix it
eventually. Let's not make that fix into a breaking change by
abstractly defining "pre" and "args" as field-requiring vals.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Until now lazy accessors were handled somehow special because their symbol was created in typers but the corresponding tree was only added in Refchecks. This irregularity caused serious problems for value classes. Also it now looks just better when lazy value is treated in a similar way as other fields.
I needed to adapt reifier so that it handles the new implementation correctly. Previously it had to recreate lazy val only by removing defdef and renaming. Now we basically need to recreate lazy val from scratch.
There is one minor change to cps plugin but that is still fine because lazy vals were never really part of the transformation.
Some range positions needed to be fixed manually. We could do it at the creation time but that would require a lot more "if (symbol.isLazy)" conditions for MethodSyntheis and Symbol/Tree creation and would just unnecessary complicate api. If someone has a better idea, please speak up. Range positions changes were necessary because previously accessors were created at refchecks and they weren't checked by validator (even though they were wrong).
This commit removes lazy val implementation restriction introduced for 2.10.0.
(cherry-picked from 981424b)
|
| |
|
| |
|
|
|
|
|
| |
Additionally includes improvements, formatting fixes, and link
additions and fixes.
|
| |
|
| |
|
|
|
|
| |
blocked by SI-6511
|
|
|
|
| |
and warning cleanup
|
| |
|
|
|
|
| |
Oh those pretty groups, u gotta luv'em...
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
I can't do any better than a reproduced comment:
For some reason which is still a bit fuzzy, we must let Nothing
through as a lower bound despite the fact that Nothing is always
a lower bound. My current supposition is that the side-effecting
type constraint accumulation mechanism depends on these subtype
tests being performed to make forward progress when there are
mutally recursive type vars. See pos/t6367 and pos/t6499 for the
competing test cases.
|
|\
| |
| | |
Another reflection bomb
|
| |
| |
| |
| | |
These are surely not necessary. Thanks Vlad!
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes the stuff that was irritating, when I was preparing examples
for reflection documentation.
Has zero impact at stability of scalac, because showRaw isn't used anywhere
in the compiler unless invoked explicitly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This trait carries mirror-related changes of the API that happen
when api.Universe transforms into api.JavaUniverse.
From a coding standpoint this is a mere rehashing of the code, but
from a documentation standpoint this provides additional insights
into what's going on in reflection.
|
| |
| |
| |
| |
| |
| | |
Because they are only available in macros.Universe, not in api.Universe,
therefore I'd argue that the confusion factor is stronger than the weirdness
of scala.reflect.api.Position extending scala.reflect.macros.Attachments.
|
| |
| |
| |
| |
| | |
For the sole reason of putting docs on it in a separate pull request,
which is being prepared elsewhere
|
| |
| |
| |
| |
| | |
nme.ROOT doesn't have much use in the public API (unlike nme.ROOTPKG).
tpnme.EMPTY duplicates a method inherited from the base class.
|