diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-11 20:00:17 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-11 20:00:17 +0000 |
commit | c6127f407014183d4d4aec12897485d5d622b76e (patch) | |
tree | dfcfd4d6da043068d200395c48e3eed948219e14 /src/compiler/scala/tools/nsc/Global.scala | |
parent | bcb3384b792b50dd256e407dbe60f3862611cf8f (diff) | |
download | scala-c6127f407014183d4d4aec12897485d5d622b76e.tar.gz scala-c6127f407014183d4d4aec12897485d5d622b76e.tar.bz2 scala-c6127f407014183d4d4aec12897485d5d622b76e.zip |
Generalized PhasesSetting to accept "all" as a ...
Generalized PhasesSetting to accept "all" as a phase and then apply
that setting to all phases. Implements ticket #924, primarily for
-Yprint:all. Removed option -Ylog-all as an unnecessary special case
(use -Ylog:all instead.)
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index ecd7bdc6de..2a4e024a21 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -126,8 +126,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable informProgress(msg + " in " + (currentTime - start) + "ms") def log(msg: AnyRef) { - if (settings.logAll.value || (settings.log contains phase.name)) - inform("[log " + phase + "] " + msg) + if (settings.log contains phase.name) inform("[log " + phase + "] " + msg) } class ErrorWithPosition(val pos: Int, val error: Throwable) extends Error @@ -686,15 +685,15 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable informTime(globalPhase.description, startTime) globalPhase = globalPhase.next - if ((settings.check contains globalPhase.prev.name) || - (settings.check contains "all")) { + if (settings.check contains globalPhase.prev.name) { if (globalPhase.prev.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") - } + } + else if (!settings.check.doAllPhases) { + warning("It is not possible to check the result of the "+globalPhase.name+" phase") + } } if (settings.statistics.value) statistics.print(phase) |