Skip to content

Commit 077d364

Browse files
committed
Avoid running PickleQuotes when possible
1 parent 99014e0 commit 077d364

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ class Inlining extends MacroTransform {
9191
if tree1.tpe.isError then tree1
9292
else Inliner.inlineCall(tree1)
9393
case _: GenericApply if tree.symbol.isQuote =>
94-
ctx.compilationUnit.needsStaging = true
95-
ctx.compilationUnit.needsQuotePickling = true
94+
if level == 0 then
95+
ctx.compilationUnit.needsQuotePickling = true
9696
super.transform(tree)(using StagingContext.quoteContext)
9797
case _: GenericApply if tree.symbol.isExprSplice =>
9898
super.transform(tree)(using StagingContext.spliceContext)

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,6 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
12941294
inlineIfIsNestedInlineCall(res)
12951295
}
12961296
if res.symbol == defn.QuotedRuntime_exprQuote then
1297-
ctx.compilationUnit.needsStaging = true
12981297
ctx.compilationUnit.needsQuotePickling = true
12991298
res
13001299

0 commit comments

Comments
 (0)