Skip to content

Commit 7e1734c

Browse files
committed
Micro-optimize SymbolLoader#complete
Avoid checking a setting value in a hot path.
1 parent d109c0b commit 7e1734c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ abstract class SymbolLoader extends LazyType {
316316
}
317317
try {
318318
val start = currentTime
319-
if (ctx.settings.YdebugTrace.value)
319+
if (Config.tracingEnabled && ctx.settings.YdebugTrace.value)
320320
trace(s">>>> loading ${root.debugString}", _ => s"<<<< loaded ${root.debugString}") {
321321
doComplete(root)
322322
}

0 commit comments

Comments
 (0)