summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-09-03 10:07:36 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-09-03 10:07:36 +0000
commit6fd613c19254867c4b2f120474e8bdb2b935b97f (patch)
tree113edcf8f8d647b1a959986c489cfb88abeda85d /src/compiler/scala/tools/nsc/Global.scala
parent386fe95009444fd73434dc3e37e193dbf0cee580 (diff)
downloadscala-6fd613c19254867c4b2f120474e8bdb2b935b97f.tar.gz
scala-6fd613c19254867c4b2f120474e8bdb2b935b97f.tar.bz2
scala-6fd613c19254867c4b2f120474e8bdb2b935b97f.zip
Phases now have a checkable flag, used by the n...
Phases now have a checkable flag, used by the new -Ycheck:all option.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 5a2c5bac5c..8eb42292d1 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -586,12 +586,17 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
if (settings.browse contains globalPhase.name) treeBrowser.browse(units)
informTime(globalPhase.description, startTime)
- globalPhase = globalPhase.next
- if (settings.check contains globalPhase.name) {
- phase = globalPhase
- if (globalPhase.id >= icodePhase.id) icodeChecker.checkICodes
- else checker.checkTrees
+ if ((settings.check contains globalPhase.name) ||
+ (settings.check contains "all")) {
+ if (globalPhase.checkable) {
+ phase = globalPhase
+ if (globalPhase.id >= icodePhase.id) icodeChecker.checkICodes
+ else checker.checkTrees
+ } else if (!(settings.check contains "all")) {
+ warning("It is not possible to check the result of the "+globalPhase.name+" phase")
+ }
}
+ globalPhase = globalPhase.next
if (settings.statistics.value) statistics.print(phase)
advancePhase
}