@@ -98,6 +98,7 @@ object PickledQuotes {
9898
9999 /** Pickle tree into it's TASTY bytes s*/
100100 private def pickle (tree : Tree )(implicit ctx : Context ): Array [Byte ] = {
101+ quotePickling.println(i " **** pickling quote of \n ${tree.show}" )
101102 val pickler = new TastyPickler (defn.RootClass )
102103 val treePkl = pickler.treePkl
103104 treePkl.pickle(tree :: Nil )
@@ -107,32 +108,21 @@ object PickledQuotes {
107108 if (tree.span.exists)
108109 new PositionPickler (pickler, treePkl.buf.addrOfTree).picklePositions(tree :: Nil )
109110
110- if (quotePickling ne noPrinter)
111- println(i " **** pickling quote of \n ${tree.show}" )
112-
113111 val pickled = pickler.assembleParts()
114-
115- if (quotePickling ne noPrinter)
116- println(new TastyPrinter (pickled).printContents())
117-
112+ quotePickling.println(s " **** pickled quote \n ${new TastyPrinter (pickled).printContents()}" )
118113 pickled
119114 }
120115
121116 /** Unpickle TASTY bytes into it's tree */
122117 private def unpickle (bytes : Array [Byte ], splices : Seq [Any ], isType : Boolean )(implicit ctx : Context ): Tree = {
123- if (quotePickling ne noPrinter) {
124- println(i " **** unpickling quote from TASTY " )
125- println(new TastyPrinter (bytes).printContents())
126- }
118+ quotePickling.println(s " **** unpickling quote from TASTY \n ${new TastyPrinter (bytes).printContents()}" )
127119
128120 val mode = if (isType) UnpickleMode .TypeTree else UnpickleMode .Term
129121 val unpickler = new QuoteUnpickler (bytes, splices, mode)
130122 unpickler.enter(Set .empty)
131- val tree = unpickler.tree
132-
133- if (quotePickling ne noPrinter)
134- println(i " **** unpickle quote ${tree.show}" )
135123
124+ val tree = unpickler.tree
125+ quotePickling.println(i " **** unpickle quote ${tree.show}" )
136126 tree
137127 }
138128
0 commit comments