summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/reflect/FastTrack.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-08-01 09:58:23 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-08-02 15:51:21 +0200
commitf7164b871530a68b100d540b876187036c1c6cbc (patch)
treefe2372803470778cafea0dd65ab1e089f3fbf231 /src/compiler/scala/tools/reflect/FastTrack.scala
parenta0a63c4558018a5e75149a45f7df775f731c26f1 (diff)
downloadscala-f7164b871530a68b100d540b876187036c1c6cbc.tar.gz
scala-f7164b871530a68b100d540b876187036c1c6cbc.tar.bz2
scala-f7164b871530a68b100d540b876187036c1c6cbc.zip
moves Expr from api to base
This is the first step in supporting serialization for exprs and type tags. Generally speaking universes and mirrors cannot be serialized (even not taking into account all the amount of scalac-specific transient stuff, java mirrors use classloaders, which are not serializable). Hence we can only serialize tree and type creators, and deserialize them into the mirror we surely know will be there - the scala.reflect.basis.rootMirror. To do that we need to have exprs in scala.reflect.base. Luckily all the trees are already in base, we only need to move a single file to scala-library.jar. Another good news is that reification logic is simplified, because we don't have to special case exprs as being defined in ApiUniverseClass.
Diffstat (limited to 'src/compiler/scala/tools/reflect/FastTrack.scala')
-rw-r--r--src/compiler/scala/tools/reflect/FastTrack.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/reflect/FastTrack.scala b/src/compiler/scala/tools/reflect/FastTrack.scala
index 237ef813c7..e093c64c72 100644
--- a/src/compiler/scala/tools/reflect/FastTrack.scala
+++ b/src/compiler/scala/tools/reflect/FastTrack.scala
@@ -38,7 +38,7 @@ trait FastTrack {
MacroInternal_materializeClassTag bindTo { case (c, Apply(TypeApply(_, List(tt)), List(u))) => c.materializeClassTag(u, tt.tpe) }
MacroInternal_materializeAbsTypeTag bindTo { case (c, Apply(TypeApply(_, List(tt)), List(u))) => c.materializeTypeTag(u, EmptyTree, tt.tpe, concrete = false) }
MacroInternal_materializeTypeTag bindTo { case (c, Apply(TypeApply(_, List(tt)), List(u))) => c.materializeTypeTag(u, EmptyTree, tt.tpe, concrete = true) }
- ApiUniverseReify bindTo { case (c, Apply(TypeApply(_, List(tt)), List(expr))) => c.materializeExpr(c.prefix.tree, EmptyTree, expr) }
+ BaseUniverseReify bindTo { case (c, Apply(TypeApply(_, List(tt)), List(expr))) => c.materializeExpr(c.prefix.tree, EmptyTree, expr) }
ReflectRuntimeCurrentMirror bindTo { case (c, _) => scala.reflect.runtime.Macros.currentMirror(c).tree }
StringContext_f bindTo { case (c, app@Apply(Select(Apply(_, parts), _), args)) => c.macro_StringInterpolation_f(parts, args, app.pos) }
registry