| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
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.
|
| |
| |
| |
| | |
Never got to use these guys, so let's better remove them.
|
| |
| |
| |
| | |
Tree.hasSymbol is really too much to document for its merit.
|
| | |
|
| |
| |
| |
| |
| | |
We decided to give up on providing symbol table traversal facilities
in the current incarnation of mirrors. Let's be consistent with ourselves.
|
| |
| |
| |
| | |
It's been more than a year, and I never used these methods.
|
| |
| |
| |
| | |
We don't really need that abstract type.
|
| |
| |
| |
| | |
The next round of scaladoc-driven cleanup kicks in.
|
| |
| |
| |
| | |
We have nme.EMPTY and tpnme.EMPTY for that.
|
| |
| |
| |
| |
| | |
And again, this is not a fatal error, so it should end with an Error,
and it should subclass not Throwable, but Exception.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Again, this is not a fatal error, so it should end with an Error,
and it should subclass not Throwable, but Exception.
Also moved the exception outside the cake to simplify error handling,
along the same lines of what've been done for parsing and reification
exceptions.
|
| |
| |
| |
| | |
Because it's not a fatal error. Neither it should subclass Throwable.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We definitely need to document scala.reflect.runtime.universe,
therefore adding scala.reflect.runtime to skipPackages was a mistake.
But then we need to make a bunch of internal classes private to reflect
or to scala. Not very pretty, but it works.
|
| |
| |
| |
| |
| | |
Macros don't correspond to bytecode-level methods, therefore
there's no need to undergo any transformations past typer.
|
|/
|
|
|
|
|
|
| |
This matter was discussed at scala-internals:
http://groups.google.com/group/scala-internals/browse_thread/thread/6414d200cf31c357
And I am convinced with Paul's argument: consistency of the convention
is very important.
|
|
|
|
|
|
|
|
|
|
|
| |
Entries in SynchronizedTypes.uniques could previously be garbage collected
in-between a successful call to contains and an actual cache lookup.
The patch could be a one-liner, but I don't want to use HOFs
in this function, whose prototype is a hotspot in the compiler.
Also the fix doesn't touch scalac in any way. It only applies to
reflective universes that provide runtime reflection functionality.
|
|\
| |
| | |
a fork of isValueType and isNonValueType
|
| |
| |
| |
| |
| |
| | |
only affects runtime reflection, because Symbol.typeSignature
is only defined in the reflection API. the rest of the compiler
uses Symbol.info instead.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Restrictions regarding how non-value types can be used have
generally not been enforced explicitly, depending instead on
the fact that the compiler wouldn't attempt to use them in
strange ways like offering a method type as a type argument.
Since users can now create most types from scratch, it has
become important to enforce the restrictions in a more
direct fashion.
This was a lot harder than it probably should have been
because there are so many types which go unmentioned by the
specification. Hopefully a useful exercise in any case.
|
| | |
|
|\ \
| | |
| | | |
Removes discrepancy between SIP 15 and compiler
|
| | |
| | |
| | |
| | | |
There was a discrepancy in that the compiler alternatively accepts a val parameter or an unbox method for a value class but SIP 15 does not mention the unbox method. I commented out the line in the compiler that does it.
|
|\ \ \
| |_|/
|/| | |
SI-6380 Add @throws[Exception]
|