@@ -32,19 +32,19 @@ class Pickler extends Phase {
32
32
pickling.println(i " unpickling in run ${ctx.runId}" )
33
33
if (ctx.settings.YtestPickler .value) beforePickling(unit) = tree.show
34
34
35
- val pickler = new TastyPickler
35
+ val pickler = unit.pickled
36
36
val treePkl = new TreePickler (pickler)
37
37
treePkl.pickle(tree :: Nil )
38
+ unit.addrOfTree = treePkl.buf.addrOfTree
38
39
if (tree.pos.exists)
39
40
new PositionPickler (pickler, treePkl.buf.addrOfTree).picklePositions(tree :: Nil , tree.pos)
40
41
41
- unit.pickled = pickler.assembleParts()
42
42
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 {
44
44
case (row, i) => s " ${i}0: ${row.mkString(" " )}"
45
45
}
46
46
// 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()
48
48
}
49
49
}
50
50
@@ -60,7 +60,7 @@ class Pickler extends Phase {
60
60
ctx.definitions.init
61
61
val unpicklers =
62
62
for (unit <- units) yield {
63
- val unpickler = new DottyUnpickler (unit.pickled)
63
+ val unpickler = new DottyUnpickler (unit.pickled.assembleParts() )
64
64
unpickler.enter(roots = Set ())
65
65
unpickler
66
66
}
0 commit comments