blob: 49d5a45e8e40a2cf818a77b84b92c5cd8c1c99e6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
package scala.reflect
package reify
import scala.reflect.reify.phases._
trait Phases extends Calculate
with Reshape
with Metalevels
with Reify {
self: Reifier =>
import mirror._
import definitions._
private var alreadyRun = false
lazy val mkReificationPipeline: Tree => Tree = tree0 => {
assert(!alreadyRun, "reifier instance cannot be used more than once")
alreadyRun = true
var tree = tree0
if (reifyDebug) println("[calculate phase]")
calculate.traverse(tree)
if (reifyDebug) println("[reshape phase]")
tree = reshape.transform(tree)
if (reifyDebug) println("[metalevels phase]")
tree = metalevels.transform(tree)
if (reifyDebug) println("[interlude]")
if (reifyDebug) println("symbol table = " + (if (symbolTable.length == 0) "<empty>" else ""))
if (reifyDebug) symbolTable foreach (println(_))
if (reifyDebug) println("reifee = " + (if (opt.showTrees) "\n" + nodePrinters.nodeToString(tree).trim else tree.toString))
if (reifyDebug) println("[reify phase]")
var result = reify(tree)
result
}
}
|