@@ -27,26 +27,24 @@ class Pickler extends Phase {
27
27
28
28
override def run (implicit ctx : Context ): Unit = {
29
29
val unit = ctx.compilationUnit
30
- if (! unit.isJava) {
31
- val tree = unit.tpdTree
32
- pickling.println(i " unpickling in run ${ctx.runId}" )
33
- if (ctx.settings.YtestPickler .value) beforePickling(unit) = tree.show
30
+ val tree = unit.tpdTree
31
+ pickling.println(i " unpickling in run ${ctx.runId}" )
32
+ if (ctx.settings.YtestPickler .value) beforePickling(unit) = tree.show
34
33
35
- val pickler = unit.pickler
36
- val treePkl = new TreePickler (pickler)
37
- treePkl.pickle(tree :: Nil )
38
- unit.addrOfTree = treePkl.buf.addrOfTree
39
- unit.addrOfSym = treePkl.addrOfSym
40
- if (tree.pos.exists)
41
- new PositionPickler (pickler, treePkl.buf.addrOfTree).picklePositions(tree :: Nil , tree.pos)
34
+ val pickler = unit.pickler
35
+ val treePkl = new TreePickler (pickler)
36
+ treePkl.pickle(tree :: Nil )
37
+ unit.addrOfTree = treePkl.buf.addrOfTree
38
+ unit.addrOfSym = treePkl.addrOfSym
39
+ if (tree.pos.exists)
40
+ new PositionPickler (pickler, treePkl.buf.addrOfTree).picklePositions(tree :: Nil , tree.pos)
42
41
43
- def rawBytes = // not needed right now, but useful to print raw format.
44
- unit.pickler.assembleParts().iterator.grouped(10 ).toList.zipWithIndex.map {
45
- case (row, i) => s " ${i}0: ${row.mkString(" " )}"
46
- }
47
- // println(i"rawBytes = \n$rawBytes%\n%") // DEBUG
48
- if (pickling ne noPrinter) new TastyPrinter (pickler.assembleParts()).printContents()
49
- }
42
+ def rawBytes = // not needed right now, but useful to print raw format.
43
+ unit.pickler.assembleParts().iterator.grouped(10 ).toList.zipWithIndex.map {
44
+ case (row, i) => s " ${i}0: ${row.mkString(" " )}"
45
+ }
46
+ // println(i"rawBytes = \n$rawBytes%\n%") // DEBUG
47
+ if (pickling ne noPrinter) new TastyPrinter (pickler.assembleParts()).printContents()
50
48
}
51
49
52
50
override def runOn (units : List [CompilationUnit ])(implicit ctx : Context ): List [CompilationUnit ] = {
0 commit comments