@@ -168,7 +168,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
168
168
if (lastPrintedSource == source)
169
169
println(" : tree is unchanged since " + lastPrintedPhase)
170
170
else {
171
- lastPrintedPhase = phase.prev // since we're running inside "afterPhase "
171
+ lastPrintedPhase = phase.prev // since we're running inside "exitingPhase "
172
172
lastPrintedSource = source
173
173
println(" " )
174
174
println(source)
@@ -782,7 +782,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
782
782
*/
783
783
def afterEachPhase [T ](op : => T ): List [(Phase , T )] = {
784
784
phaseDescriptors.map(_.ownPhase).filterNot(_ eq NoPhase ).foldLeft(List [(Phase , T )]()) { (res, ph) =>
785
- val value = afterPhase (ph)(op)
785
+ val value = exitingPhase (ph)(op)
786
786
if (res.nonEmpty && res.head._2 == value) res
787
787
else ((ph, value)) :: res
788
788
} reverse
@@ -1051,26 +1051,26 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1051
1051
def currentSource : SourceFile = if (currentUnit.exists) currentUnit.source else lastSeenSourceFile
1052
1052
1053
1053
// TODO - trim these to the absolute minimum.
1054
- @ inline final def afterErasure [T ](op : => T ): T = afterPhase (currentRun.erasurePhase)(op)
1055
- @ inline final def afterExplicitOuter [T ](op : => T ): T = afterPhase (currentRun.explicitouterPhase)(op)
1056
- @ inline final def afterFlatten [T ](op : => T ): T = afterPhase (currentRun.flattenPhase)(op)
1057
- @ inline final def afterIcode [T ](op : => T ): T = afterPhase (currentRun.icodePhase)(op)
1058
- @ inline final def afterMixin [T ](op : => T ): T = afterPhase (currentRun.mixinPhase)(op)
1059
- @ inline final def afterPickler [T ](op : => T ): T = afterPhase (currentRun.picklerPhase)(op)
1060
- @ inline final def afterRefchecks [T ](op : => T ): T = afterPhase (currentRun.refchecksPhase)(op)
1061
- @ inline final def afterSpecialize [T ](op : => T ): T = afterPhase (currentRun.specializePhase)(op)
1062
- @ inline final def afterTyper [T ](op : => T ): T = afterPhase (currentRun.typerPhase)(op)
1063
- @ inline final def afterUncurry [T ](op : => T ): T = afterPhase (currentRun.uncurryPhase)(op)
1064
- @ inline final def beforeErasure [T ](op : => T ): T = beforePhase (currentRun.erasurePhase)(op)
1065
- @ inline final def beforeExplicitOuter [T ](op : => T ): T = beforePhase (currentRun.explicitouterPhase)(op)
1066
- @ inline final def beforeFlatten [T ](op : => T ): T = beforePhase (currentRun.flattenPhase)(op)
1067
- @ inline final def beforeIcode [T ](op : => T ): T = beforePhase (currentRun.icodePhase)(op)
1068
- @ inline final def beforeMixin [T ](op : => T ): T = beforePhase (currentRun.mixinPhase)(op)
1069
- @ inline final def beforePickler [T ](op : => T ): T = beforePhase (currentRun.picklerPhase)(op)
1070
- @ inline final def beforeRefchecks [T ](op : => T ): T = beforePhase (currentRun.refchecksPhase)(op)
1071
- @ inline final def beforeSpecialize [T ](op : => T ): T = beforePhase (currentRun.specializePhase)(op)
1072
- @ inline final def beforeTyper [T ](op : => T ): T = beforePhase (currentRun.typerPhase)(op)
1073
- @ inline final def beforeUncurry [T ](op : => T ): T = beforePhase (currentRun.uncurryPhase)(op)
1054
+ @ inline final def exitingErasure [T ](op : => T ): T = exitingPhase (currentRun.erasurePhase)(op)
1055
+ @ inline final def exitingExplicitOuter [T ](op : => T ): T = exitingPhase (currentRun.explicitouterPhase)(op)
1056
+ @ inline final def exitingFlatten [T ](op : => T ): T = exitingPhase (currentRun.flattenPhase)(op)
1057
+ @ inline final def exitingIcode [T ](op : => T ): T = exitingPhase (currentRun.icodePhase)(op)
1058
+ @ inline final def exitingMixin [T ](op : => T ): T = exitingPhase (currentRun.mixinPhase)(op)
1059
+ @ inline final def exitingPickler [T ](op : => T ): T = exitingPhase (currentRun.picklerPhase)(op)
1060
+ @ inline final def exitingRefchecks [T ](op : => T ): T = exitingPhase (currentRun.refchecksPhase)(op)
1061
+ @ inline final def exitingSpecialize [T ](op : => T ): T = exitingPhase (currentRun.specializePhase)(op)
1062
+ @ inline final def exitingTyper [T ](op : => T ): T = exitingPhase (currentRun.typerPhase)(op)
1063
+ @ inline final def exitingUncurry [T ](op : => T ): T = exitingPhase (currentRun.uncurryPhase)(op)
1064
+ @ inline final def enteringErasure [T ](op : => T ): T = enteringPhase (currentRun.erasurePhase)(op)
1065
+ @ inline final def enteringExplicitOuter [T ](op : => T ): T = enteringPhase (currentRun.explicitouterPhase)(op)
1066
+ @ inline final def enteringFlatten [T ](op : => T ): T = enteringPhase (currentRun.flattenPhase)(op)
1067
+ @ inline final def enteringIcode [T ](op : => T ): T = enteringPhase (currentRun.icodePhase)(op)
1068
+ @ inline final def enteringMixin [T ](op : => T ): T = enteringPhase (currentRun.mixinPhase)(op)
1069
+ @ inline final def enteringPickler [T ](op : => T ): T = enteringPhase (currentRun.picklerPhase)(op)
1070
+ @ inline final def enteringRefchecks [T ](op : => T ): T = enteringPhase (currentRun.refchecksPhase)(op)
1071
+ @ inline final def enteringSpecialize [T ](op : => T ): T = enteringPhase (currentRun.specializePhase)(op)
1072
+ @ inline final def enteringTyper [T ](op : => T ): T = enteringPhase (currentRun.typerPhase)(op)
1073
+ @ inline final def enteringUncurry [T ](op : => T ): T = enteringPhase (currentRun.uncurryPhase)(op)
1074
1074
1075
1075
def explainContext (c : analyzer.Context ): String = (
1076
1076
if (c == null ) " " else (
@@ -1109,7 +1109,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1109
1109
1110
1110
val info1 = formatExplain(
1111
1111
" while compiling" -> currentSource.path,
1112
- " during phase" -> ( if (globalPhase eq phase) phase else " global=%s, atPhase =%s" .format(globalPhase, phase) ),
1112
+ " during phase" -> ( if (globalPhase eq phase) phase else " global=%s, enteringPhase =%s" .format(globalPhase, phase) ),
1113
1113
" library version" -> scala.util.Properties .versionString,
1114
1114
" compiler version" -> Properties .versionString,
1115
1115
" reconstructed args" -> settings.recreateArgs.mkString(" " )
@@ -1469,7 +1469,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1469
1469
lazy val trackers = currentRun.units.toList map (x => SymbolTracker (x))
1470
1470
def snapshot () = {
1471
1471
inform(" \n [[symbol layout at end of " + phase + " ]]" )
1472
- afterPhase (phase) {
1472
+ exitingPhase (phase) {
1473
1473
trackers foreach { t =>
1474
1474
t.snapshot()
1475
1475
inform(t.show(" Heading from " + phase.prev.name + " to " + phase.name))
@@ -1605,7 +1605,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1605
1605
1606
1606
// Reset project
1607
1607
if (! stopPhase(" namer" )) {
1608
- atPhase (namerPhase) {
1608
+ enteringPhase (namerPhase) {
1609
1609
resetProjectClasses(RootClass )
1610
1610
}
1611
1611
}
@@ -1645,7 +1645,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1645
1645
if (firstPhase ne null ) { // we might get here during initialization, is a source is newer than the binary
1646
1646
val maxId = math.max(globalPhase.id, typerPhase.id)
1647
1647
firstPhase.iterator takeWhile (_.id < maxId) foreach (ph =>
1648
- atPhase (ph)(ph.asInstanceOf [GlobalPhase ] applyPhase unit))
1648
+ enteringPhase (ph)(ph.asInstanceOf [GlobalPhase ] applyPhase unit))
1649
1649
refreshProgress
1650
1650
}
1651
1651
}
@@ -1654,8 +1654,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1654
1654
* is needed for?)
1655
1655
*/
1656
1656
private def resetPackageClass (pclazz : Symbol ) {
1657
- atPhase (firstPhase) {
1658
- pclazz.setInfo(atPhase (typerPhase)(pclazz.info))
1657
+ enteringPhase (firstPhase) {
1658
+ pclazz.setInfo(enteringPhase (typerPhase)(pclazz.info))
1659
1659
}
1660
1660
if (! pclazz.isRoot) resetPackageClass(pclazz.owner)
1661
1661
}
@@ -1703,7 +1703,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1703
1703
1704
1704
def printAllUnits () {
1705
1705
print(" [[syntax trees at end of %25s]]" .format(phase))
1706
- afterPhase (phase)(currentRun.units foreach { unit =>
1706
+ exitingPhase (phase)(currentRun.units foreach { unit =>
1707
1707
nodePrinters showUnit unit
1708
1708
})
1709
1709
}
@@ -1712,7 +1712,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
1712
1712
*/
1713
1713
def showDef (fullName : Name , declsOnly : Boolean , ph : Phase ) = {
1714
1714
val boringOwners = Set [Symbol ](definitions.AnyClass , definitions.AnyRefClass , definitions.ObjectClass )
1715
- def phased [T ](body : => T ): T = afterPhase (ph)(body)
1715
+ def phased [T ](body : => T ): T = exitingPhase (ph)(body)
1716
1716
def boringMember (sym : Symbol ) = boringOwners(sym.owner)
1717
1717
def symString (sym : Symbol ) = if (sym.isTerm) sym.defString else sym.toString
1718
1718
0 commit comments