@@ -72,14 +72,14 @@ object Phases {
72
72
override def lastPhaseId (implicit ctx : Context ) = id
73
73
}
74
74
75
- def phasePlan = this .phasesPlan
76
- def setPhasePlan (phasess : List [List [Phase ]]) = this .phasesPlan = phasess
75
+ final def phasePlan = this .phasesPlan
76
+ final def setPhasePlan (phasess : List [List [Phase ]]) = this .phasesPlan = phasess
77
77
78
78
/** Squash TreeTransform's beloning to same sublist to a single TreeTransformer
79
79
* Each TreeTransform gets own period,
80
80
* whereas a combined TreeTransformer gets period equal to union of periods of it's TreeTransforms
81
81
*/
82
- def squashPhases (phasess : List [List [Phase ]],
82
+ final def squashPhases (phasess : List [List [Phase ]],
83
83
phasesToSkip : List [String ], stopBeforePhases : List [String ], stopAfterPhases : List [String ], YCheckAfter : List [String ]): List [Phase ] = {
84
84
val squashedPhases = ListBuffer [Phase ]()
85
85
var prevPhases : Set [Class [_ <: Phase ]] = Set .empty
@@ -139,7 +139,7 @@ object Phases {
139
139
* The list should never contain NoPhase.
140
140
* if squashing is enabled, phases in same subgroup will be squashed to single phase.
141
141
*/
142
- def usePhases (phasess : List [Phase ], squash : Boolean = true ) = {
142
+ final def usePhases (phasess : List [Phase ], squash : Boolean = true ) = {
143
143
144
144
val flatPhases = collection.mutable.ListBuffer [Phase ]()
145
145
@@ -212,33 +212,33 @@ object Phases {
212
212
config.println(s " nextDenotTransformerId = ${nextDenotTransformerId.deep}" )
213
213
}
214
214
215
- private var myTyperPhase : Phase = _
216
- private var myPicklerPhase : Phase = _
217
- private var myRefChecksPhase : Phase = _
218
- private var myPatmatPhase : Phase = _
219
- private var myElimRepeatedPhase : Phase = _
220
- private var myExtensionMethodsPhase : Phase = _
221
- private var myExplicitOuterPhase : Phase = _
222
- private var myGettersPhase : Phase = _
223
- private var myErasurePhase : Phase = _
224
- private var myElimErasedValueTypePhase : Phase = _
225
- private var myLambdaLiftPhase : Phase = _
226
- private var myFlattenPhase : Phase = _
227
- private var myGenBCodePhase : Phase = _
228
-
229
- def typerPhase = myTyperPhase
230
- def picklerPhase = myPicklerPhase
231
- def refchecksPhase = myRefChecksPhase
232
- def patmatPhase = myPatmatPhase
233
- def elimRepeatedPhase = myElimRepeatedPhase
234
- def extensionMethodsPhase = myExtensionMethodsPhase
235
- def explicitOuterPhase = myExplicitOuterPhase
236
- def gettersPhase = myGettersPhase
237
- def erasurePhase = myErasurePhase
238
- def elimErasedValueTypePhase = myElimErasedValueTypePhase
239
- def lambdaLiftPhase = myLambdaLiftPhase
240
- def flattenPhase = myFlattenPhase
241
- def genBCodePhase = myGenBCodePhase
215
+ private [ this ] var myTyperPhase : Phase = _
216
+ private [ this ] var myPicklerPhase : Phase = _
217
+ private [ this ] var myRefChecksPhase : Phase = _
218
+ private [ this ] var myPatmatPhase : Phase = _
219
+ private [ this ] var myElimRepeatedPhase : Phase = _
220
+ private [ this ] var myExtensionMethodsPhase : Phase = _
221
+ private [ this ] var myExplicitOuterPhase : Phase = _
222
+ private [ this ] var myGettersPhase : Phase = _
223
+ private [ this ] var myErasurePhase : Phase = _
224
+ private [ this ] var myElimErasedValueTypePhase : Phase = _
225
+ private [ this ] var myLambdaLiftPhase : Phase = _
226
+ private [ this ] var myFlattenPhase : Phase = _
227
+ private [ this ] var myGenBCodePhase : Phase = _
228
+
229
+ final def typerPhase = myTyperPhase
230
+ final def picklerPhase = myPicklerPhase
231
+ final def refchecksPhase = myRefChecksPhase
232
+ final def patmatPhase = myPatmatPhase
233
+ final def elimRepeatedPhase = myElimRepeatedPhase
234
+ final def extensionMethodsPhase = myExtensionMethodsPhase
235
+ final def explicitOuterPhase = myExplicitOuterPhase
236
+ final def gettersPhase = myGettersPhase
237
+ final def erasurePhase = myErasurePhase
238
+ final def elimErasedValueTypePhase = myElimErasedValueTypePhase
239
+ final def lambdaLiftPhase = myLambdaLiftPhase
240
+ final def flattenPhase = myFlattenPhase
241
+ final def genBCodePhase = myGenBCodePhase
242
242
243
243
private def setSpecificPhases () = {
244
244
def phaseOfClass (pclass : Class [_]) = phases.find(pclass.isInstance).getOrElse(NoPhase )
@@ -258,7 +258,7 @@ object Phases {
258
258
myGenBCodePhase = phaseOfClass(classOf [GenBCode ])
259
259
}
260
260
261
- def isAfterTyper (phase : Phase ): Boolean = phase.id > typerPhase.id
261
+ final def isAfterTyper (phase : Phase ): Boolean = phase.id > typerPhase.id
262
262
}
263
263
264
264
trait Phase extends DotClass {
0 commit comments