@@ -168,7 +168,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
168168 if (lastPrintedSource == source)
169169 println(" : tree is unchanged since " + lastPrintedPhase)
170170 else {
171- lastPrintedPhase = phase.prev // since we're running inside "afterPhase "
171+ lastPrintedPhase = phase.prev // since we're running inside "exitingPhase "
172172 lastPrintedSource = source
173173 println(" " )
174174 println(source)
@@ -782,7 +782,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
782782 */
783783 def afterEachPhase [T ](op : => T ): List [(Phase , T )] = {
784784 phaseDescriptors.map(_.ownPhase).filterNot(_ eq NoPhase ).foldLeft(List [(Phase , T )]()) { (res, ph) =>
785- val value = afterPhase (ph)(op)
785+ val value = exitingPhase (ph)(op)
786786 if (res.nonEmpty && res.head._2 == value) res
787787 else ((ph, value)) :: res
788788 } reverse
@@ -1051,26 +1051,26 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
10511051 def currentSource : SourceFile = if (currentUnit.exists) currentUnit.source else lastSeenSourceFile
10521052
10531053 // 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)
10741074
10751075 def explainContext (c : analyzer.Context ): String = (
10761076 if (c == null ) " " else (
@@ -1109,7 +1109,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
11091109
11101110 val info1 = formatExplain(
11111111 " 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) ),
11131113 " library version" -> scala.util.Properties .versionString,
11141114 " compiler version" -> Properties .versionString,
11151115 " reconstructed args" -> settings.recreateArgs.mkString(" " )
@@ -1469,7 +1469,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
14691469 lazy val trackers = currentRun.units.toList map (x => SymbolTracker (x))
14701470 def snapshot () = {
14711471 inform(" \n [[symbol layout at end of " + phase + " ]]" )
1472- afterPhase (phase) {
1472+ exitingPhase (phase) {
14731473 trackers foreach { t =>
14741474 t.snapshot()
14751475 inform(t.show(" Heading from " + phase.prev.name + " to " + phase.name))
@@ -1605,7 +1605,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
16051605
16061606 // Reset project
16071607 if (! stopPhase(" namer" )) {
1608- atPhase (namerPhase) {
1608+ enteringPhase (namerPhase) {
16091609 resetProjectClasses(RootClass )
16101610 }
16111611 }
@@ -1645,7 +1645,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
16451645 if (firstPhase ne null ) { // we might get here during initialization, is a source is newer than the binary
16461646 val maxId = math.max(globalPhase.id, typerPhase.id)
16471647 firstPhase.iterator takeWhile (_.id < maxId) foreach (ph =>
1648- atPhase (ph)(ph.asInstanceOf [GlobalPhase ] applyPhase unit))
1648+ enteringPhase (ph)(ph.asInstanceOf [GlobalPhase ] applyPhase unit))
16491649 refreshProgress
16501650 }
16511651 }
@@ -1654,8 +1654,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
16541654 * is needed for?)
16551655 */
16561656 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))
16591659 }
16601660 if (! pclazz.isRoot) resetPackageClass(pclazz.owner)
16611661 }
@@ -1703,7 +1703,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
17031703
17041704 def printAllUnits () {
17051705 print(" [[syntax trees at end of %25s]]" .format(phase))
1706- afterPhase (phase)(currentRun.units foreach { unit =>
1706+ exitingPhase (phase)(currentRun.units foreach { unit =>
17071707 nodePrinters showUnit unit
17081708 })
17091709 }
@@ -1712,7 +1712,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
17121712 */
17131713 def showDef (fullName : Name , declsOnly : Boolean , ph : Phase ) = {
17141714 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)
17161716 def boringMember (sym : Symbol ) = boringOwners(sym.owner)
17171717 def symString (sym : Symbol ) = if (sym.isTerm) sym.defString else sym.toString
17181718
0 commit comments