Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions compiler/src/dotty/tools/dotc/inlines/Inliner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1144,9 +1144,10 @@ class Inliner(val call: tpd.Tree)(using Context):
else
ctx.compilationUnit.suspend(hints.nn.toList.mkString(", ")) // this throws a SuspendException

val evaluatedSplice = inContext(quoted.MacroExpansion.context(inlinedFrom)) {
Splicer.splice(body, splicePos, inlinedFrom.srcPos, MacroClassLoader.fromContext)
}
val evaluatedSplice =
inContext(quoted.MacroExpansion.context(inlinedFrom)):
ctx.profiler.onMacroSplice(inlinedFrom.symbol):
Splicer.splice(body, splicePos, inlinedFrom.srcPos, MacroClassLoader.fromContext)
val inlinedNormalizer = new TreeMap {
override def transform(tree: tpd.Tree)(using Context): tpd.Tree = tree match {
case tree @ Inlined(_, Nil, expr) if tree.inlinedFromOuterScope && enclosingInlineds.isEmpty => transform(expr)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/Splicer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object Splicer {
inContext(sliceContext) {
val oldContextClassLoader = Thread.currentThread().getContextClassLoader
Thread.currentThread().setContextClassLoader(classLoader)
try ctx.profiler.onMacroSplice(owner){
try {
val interpreter = new SpliceInterpreter(splicePos, classLoader)

// Some parts of the macro are evaluated during the unpickling performed in quotedExprToTree
Expand Down
Loading