Skip to content

Commit 1cf6b91

Browse files
committed
Avoid retraversing parts of the tree that do not contain Quote trees
1 parent 8a055d6 commit 1cf6b91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/PickleQuotes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ class PickleQuotes extends MacroTransform {
100100
tree match
101101
case Apply(Select(quote: Quote, nme.apply), List(quotes)) =>
102102
val (contents, quote1) = makeHoles(quote)
103-
val pickled = PickleQuotes.pickle(quote1, quotes, contents)
104-
transform(pickled) // pickle quotes that are in the contents
103+
val contents1 = contents.map(transform(_))
104+
PickleQuotes.pickle(quote1, quotes, contents1)
105105
case tree: DefDef if !tree.rhs.isEmpty && tree.symbol.isInlineMethod =>
106106
// Shrink size of the tree. The methods have already been inlined.
107107
// TODO move to FirstTransform to trigger even without quotes

0 commit comments

Comments
 (0)