| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
1) parseExpr => parse
2) runExpr => eval
3) Introduces compile(Tree): () => Any, since it has frequent uses
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements SIP 16: Self-cleaning macros: http://bit.ly/wjjXTZ
Features:
* Macro defs
* Reification
* Type tags
* Manifests aliased to type tags
* Extended reflection API
* Several hundred tests
* 1111 changed files
Not yet implemented:
* Reification of refined types
* Expr.value splicing
* Named and default macro expansions
* Intricacies of interaction between macros and implicits
* Emission of debug information for macros (compliant with JSR-45)
Dedicated to Yuri Alekseyevich Gagarin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|