@@ -111,9 +111,9 @@ class ScoverageCompiler(settings: scala.tools.nsc.Settings, reporter: scala.tool
111111
112112 class PositionValidator (val global : Global ) extends PluginComponent with TypingTransformers with Transform {
113113
114- override val phaseName : String = " scoverage-validator"
115- override val runsAfter : List [ String ] = List (" typer" )
116- override val runsBefore = List [ String ] (" scoverage-instrumentation" )
114+ override val phaseName = " scoverage-validator"
115+ override val runsAfter = List (" typer" )
116+ override val runsBefore = List (" scoverage-instrumentation" )
117117
118118 override protected def newTransformer (unit : global.CompilationUnit ): global.Transformer = new Transformer (unit)
119119 class Transformer (unit : global.CompilationUnit ) extends TypingTransformer (unit) {
@@ -129,10 +129,9 @@ class ScoverageCompiler(settings: scala.tools.nsc.Settings, reporter: scala.tool
129129
130130 val sources = new ListBuffer [String ]
131131
132- override val phaseName : String = " scoverage-teststore"
133- override val runsAfter : List [String ] = List (" dce" )
134- // deadcode
135- override val runsBefore = List [String ](" terminal" )
132+ override val phaseName = " scoverage-teststore"
133+ override val runsAfter = List (" dce" )
134+ override val runsBefore = List (" terminal" )
136135
137136 override protected def newTransformer (unit : global.CompilationUnit ): global.Transformer = new Transformer (unit)
138137 class Transformer (unit : global.CompilationUnit ) extends TypingTransformer (unit) {
@@ -145,38 +144,10 @@ class ScoverageCompiler(settings: scala.tools.nsc.Settings, reporter: scala.tool
145144 }
146145
147146 override def computeInternalPhases () {
148- val phs = List (
149- syntaxAnalyzer -> " parse source into ASTs, perform simple desugaring" ,
150- analyzer.namerFactory -> " resolve names, attach symbols to named trees" ,
151- analyzer.packageObjects -> " load package objects" ,
152- analyzer.typerFactory -> " the meat and potatoes: type the trees" ,
153- validator -> " scoverage validator" ,
154- instrumentationComponent -> " scoverage instrumentationComponent" ,
155- patmat -> " translate match expressions" ,
156- superAccessors -> " add super accessors in traits and nested classes" ,
157- extensionMethods -> " add extension methods for inline classes" ,
158- pickler -> " serialize symbol tables" ,
159- refChecks -> " reference/override checking, translate nested objects" ,
160- uncurry -> " uncurry, translate function values to anonymous classes" ,
161- tailCalls -> " replace tail calls by jumps" ,
162- specializeTypes -> " @specialized-driven class and method specialization" ,
163- explicitOuter -> " this refs to outer pointers, translate patterns" ,
164- erasure -> " erase types, add interfaces for traits" ,
165- postErasure -> " clean up erased inline classes" ,
166- lazyVals -> " allocate bitmaps, translate lazy vals into lazified defs" ,
167- lambdaLift -> " move nested functions to top level" ,
168- constructors -> " move field definitions into constructors" ,
169- mixer -> " mixin composition" ,
170- cleanup -> " platform-specific cleanups, generate reflective calls" ,
171- genicode -> " generate portable intermediate code" ,
172- inliner -> " optimization: do inlining" ,
173- inlineExceptionHandlers -> " optimization: inline exception handlers" ,
174- closureElimination -> " optimization: eliminate uncalled closures" ,
175- deadCode -> " optimization: eliminate dead code" ,
176- testStore -> " scoverage teststore" ,
177- terminal -> " The last phase in the compiler chain"
178- )
179- phs foreach (addToPhasesSet _).tupled
147+ super .computeInternalPhases()
148+ addToPhasesSet(validator, " scoverage validator" )
149+ addToPhasesSet(instrumentationComponent, " scoverage instrumentationComponent" )
150+ addToPhasesSet(testStore, " scoverage teststore" )
180151 }
181152}
182153
0 commit comments