@@ -32,19 +32,19 @@ class Pickler extends Phase {
3232 pickling.println(i " unpickling in run ${ctx.runId}" )
3333 if (ctx.settings.YtestPickler .value) beforePickling(unit) = tree.show
3434
35- val pickler = new TastyPickler
35+ val pickler = unit.pickled
3636 val treePkl = new TreePickler (pickler)
3737 treePkl.pickle(tree :: Nil )
38+ unit.addrOfTree = treePkl.buf.addrOfTree
3839 if (tree.pos.exists)
3940 new PositionPickler (pickler, treePkl.buf.addrOfTree).picklePositions(tree :: Nil , tree.pos)
4041
41- unit.pickled = pickler.assembleParts()
4242 def rawBytes = // not needed right now, but useful to print raw format.
43- unit.pickled.iterator.grouped(10 ).toList.zipWithIndex.map {
43+ unit.pickled.assembleParts(). iterator.grouped(10 ).toList.zipWithIndex.map {
4444 case (row, i) => s " ${i}0: ${row.mkString(" " )}"
4545 }
4646 // println(i"rawBytes = \n$rawBytes%\n%") // DEBUG
47- if (pickling ne noPrinter) new TastyPrinter (unit.pickled ).printContents()
47+ if (pickling ne noPrinter) new TastyPrinter (pickler.assembleParts() ).printContents()
4848 }
4949 }
5050
@@ -60,7 +60,7 @@ class Pickler extends Phase {
6060 ctx.definitions.init
6161 val unpicklers =
6262 for (unit <- units) yield {
63- val unpickler = new DottyUnpickler (unit.pickled)
63+ val unpickler = new DottyUnpickler (unit.pickled.assembleParts() )
6464 unpickler.enter(roots = Set ())
6565 unpickler
6666 }
0 commit comments