| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Hacked filename into message to alleviate meaningless
"_$1 defined twice" error condition. References SI-4893.
|
|
|
|
|
|
| |
And some tests for pending.
Closes SI-5358.
|
|
|
|
| |
Some in pending, some in files. Closes SI-4770.
|
|
|
|
|
|
| |
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.
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|\ \
| | |
| | |
| | | |
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.
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Annotations are now supported by the reifier:
* AnnotationInfos from symbols get transformed back into mods.
* AnnotatedTypes are retained and are reified along with AnnotationInfos.
Reification is no magic, and reification of annotations especially:
* Annotations cannot refer to symbols defined inside the quasiquote.
This restriction is due to the fact that we need to erase locally defined
symbols before reifying to make subsequent reflective compilations succeed.
However, while doing that, we also need to make sure that we don't make
resulting ASTs non-compilable by removing essential information.
This is tricky, and it more or less works for TypeTrees, but
not for annotations that can contain arbitrary ASTs.
For more details look into the comments to Reifiers.scala.
* Classfile annotations that contain array arguments and are applied to types,
i.e. the ones that generate AnnotatedTypes, cannot be reified.
This is because of limitations of manifest infrastructure.
Typechecking "Array(mirror.LiteralAnnotArg(...))" would require the compiler
to produce a manifest for a path-dependent type, which cannot be done now.
Review by @odersky.
|
|\ \ \
| | | |
| | | |
| | | | |
'scalamacros/pullrequest/5334', 'scalamacros/pullrequest/5272' and 'VladUreche/issue/5287-cleanup' into develop
|
| |_|/
|/| | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New version of reification isn't susceptible to this bug.
The problem was with Code.lift generating not only a tree, but also
a manifest with the type of that tree. That led to an issue in the case
of the type of the manifest depending on a class declared inside the
quasiquote.
Now manifests in reification are gone, so is the problem.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Major cleanup of reification:
* LiftCode phase has been removed
* Code has been deprecated and will be removed as we roll a new starr
* Logic related to type-directed lifting has been purged
scala.reflect.macro.Context#reify now provides the same services
as LiftCode provided (except that it returns Tree, not Code).
For testing purposes, I've retained the oh-so-convenient automagic lift.
test/files/codelib/code.jar now hosts Code.lift reimplemented in a macro,
so that the tests can continue working as if nothing has happened.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|\ \
| | |
| | |
| | | |
'kepler/topic/reifyclosuretests', 'kepler/topic/antscalacheck', 'szabolcsberecz/SI-5104', 'kepler/ticket/5334' and 'kepler/topic/miscfixes' into develop
|
| |/
|/| |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wrapper method for AST undergoing a reflective compilation
has been incorrectly marked as static.
This was off the radars until one day the code being compiled declared
a top-level method. During flatten that method got hoisted into the
wrapper module, and its invocation got translated into an instance
call upon the module. This led to static wrapper method trying to call
an instance method, and that blew up the bytecode verifier. More info:
https://issues.scala-lang.org/browse/SI-5266.
Fixes SI-5266, review by @odersky.
|
|
|
|
| |
Also see https://github.com/scala/scala/pull/25.
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
| |
Multiple minor fixes to Martin's implementation of reflection infrastructure.
Dominating theme is allowing for the fact that compilation via reflection
involves numerous exports/imports between various reflection universes.
Fixes SI-5230. Review by @odersky.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
If extempore is going to fix the hard bugs then first he is going to
make them less hard to fix. The major work of interest in here is the
decomplification of the bitmap logic. Hopefully this will come in handy
for anyone wishing to try out other encodings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
output generation (but only then, since otherwise we're not creating the
jar):
1) -Xmain-class foo.Bar will give the jar a Main-Class of foo.Bar 2)
Alternatively, if there is only one runnable program, that will be
the Main-Class 3) Always, the jar's manifest will have an entry for
Scala-Compiler-Version.
Not very relatedly, a warning is now issued when a module has a main
method but a runnable program will not be generated. Closes SI-4861.
This represents an opening step toward automatically recognizing
mismatched bytecode situations: coarse, but useful and safe. Review by
mirco.
|
|
|
|
|
| |
A few tests for pending and non-pending, no review.
|
|
|
|
|
|
|
|
| |
A response to adriaan's last lub commit of the housekeeping and pretty
printing variety. Non-invasive surgery, don't worry martin. Simplified
the input to lublist a bit. Includes illustrative test case for current
brand of lub failures. Review by moors.
|
| |
|
| |
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
test in r25038, so closes #4512, no review.
|
|
|
|
|
|
|
|
| |
Temporarily sending lisp.scala to be interpreter.scala's equally memory
hungry buddy in pending. References #4512. This should be straightened
out imminently, but I will solve this more easily by looking forward,
not backward. No review.
|
|
|
|
|
|
|
|
|
| |
Working my way through pattern matcher sequence issues mostly caused by
the special handling of Lists. Also deleting all kinds of useless or
almost useless code which is presently only clutter.
Closes #2756, #2800, #3050, #3530, #3972, no review.
|
|
|
|
|
|
|
| |
Fixes my part of #4283 by inserting another cast pre-emptively when an
IllegalAccess error is possible in an erasure-inserted cast. Review by
extempore.
|
| |
|
|
|
|
|
|
|
|
| |
Moved failing tests to pending after having diagnosed that the only
problem is a difference in output between Java 1.5 and 1.6 reflection
libraries. Can we moved back once that's fixed. For now, it's more
important to ghet the build back.
|
|
|
|
|
|
| |
Spiced up the signature test infrastructure a bunch, wrote some more
tests, restored the tests in pending. No review.
|
|
|
|
|
|
| |
Moving signature tests to pending, because they operate under wrong
assumptions now that mixed in members are bridges. Review by extempore.
|