@@ -3,25 +3,24 @@ package dotty.tools.dotc.transform
33import dotty .tools .dotc .CompilationUnit
44import dotty .tools .dotc .ast .Trees ._
55import dotty .tools .dotc .ast .tpd
6+ import dotty .tools .dotc .core .Phases .Phase
67import dotty .tools .dotc .core .Contexts ._
78import dotty .tools .dotc .core .SymDenotations .ClassDenotation
89import dotty .tools .dotc .core .Symbols ._
910import dotty .tools .dotc .core .Flags ._
10- import dotty .tools .dotc .transform .TreeTransforms ._
1111
1212/** Loads all potentially reachable trees from tasty. ▲
1313 * Only performed on whole world optimization mode. ▲ ▲
1414 *
1515 * TODO: Next step is to only load compilation units reachable in the call graph
1616 */
17- class LinkAll extends MiniPhaseTransform {
17+ class LinkAll extends Phase {
1818 import tpd ._
1919 import LinkAll ._
2020
21- override def phaseName = " linkAll"
21+ def phaseName : String = " linkAll"
2222
23- /** Do not transform the any tree, runOn will traverse the trees and reload compilation units if needed */
24- override def prepareForUnit (tree : tpd.Tree )(implicit ctx : Context ): TreeTransform = NoTransform
23+ def run (implicit ctx : Context ): Unit = ()
2524
2625 override def runOn (units : List [CompilationUnit ])(implicit ctx : Context ): List [CompilationUnit ] = {
2726 /** Loads and processes new compilation units, possibly loading more units. */
@@ -35,7 +34,7 @@ class LinkAll extends MiniPhaseTransform {
3534 }
3635 }
3736
38- if (ctx.settings.XlinkOptimise .value) super .runOn( allUnits(Set .empty, units.toSet, Set .empty) )
37+ if (ctx.settings.XlinkOptimise .value) allUnits(Set .empty, units.toSet, Set .empty)
3938 else units
4039 }
4140
0 commit comments