Skip to content

Commit ed5eb24

Browse files
committed
Avoid useless computations in LinkAll
This simple change brings down the number of calls to `hasRedefinedMethod` from 24'000 to 3'500. This makes me wonder whether `LinkAll` is using the Phase framework in the right way. As far as I can see nobody else calls MiniPhase.runOn
1 parent e73508e commit ed5eb24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class LinkAll extends MiniPhaseTransform {
3636
}
3737

3838
if (ctx.settings.XlinkOptimise.value) super.runOn(allUnits(Set.empty, units.toSet, Set.empty))
39-
else super.runOn(units)
39+
else units
4040
}
4141

4242
/** Collects all class denotations that may need to be loaded. */

0 commit comments

Comments
 (0)