diff options
author | Martin Odersky <odersky@gmail.com> | 2005-09-23 12:28:07 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2005-09-23 12:28:07 +0000 |
commit | fcc3a4867d2df32377b56c908c46617a92745ce8 (patch) | |
tree | 534c4deb305f19ca3c3a76b3472b87c7dadb868d /sources/scala/tools/nsc/Global.scala | |
parent | 14c330159a76b428b4ca5aa25c112d61836bd79a (diff) | |
download | scala-fcc3a4867d2df32377b56c908c46617a92745ce8.tar.gz scala-fcc3a4867d2df32377b56c908c46617a92745ce8.tar.bz2 scala-fcc3a4867d2df32377b56c908c46617a92745ce8.zip |
*** empty log message ***
Diffstat (limited to 'sources/scala/tools/nsc/Global.scala')
-rwxr-xr-x | sources/scala/tools/nsc/Global.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/scala/tools/nsc/Global.scala b/sources/scala/tools/nsc/Global.scala index 30e05a306d..117b0271e1 100755 --- a/sources/scala/tools/nsc/Global.scala +++ b/sources/scala/tools/nsc/Global.scala @@ -153,11 +153,6 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable var globalPhase: Phase = NoPhase; - override def phase_=(p: Phase): unit = { - assert(p.id <= globalPhase.id + 1); - super.phase_=(p) - } - abstract class GlobalPhase(prev: Phase) extends Phase(prev) { def run: unit = units foreach applyPhase; def apply(unit: CompilationUnit): unit; @@ -264,6 +259,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable val parserPhase = syntaxAnalyzer.newPhase(NoPhase); val firstPhase = parserPhase; + currentRun = NoRun + 1; phase = parserPhase; definitions.init; // needs firstPhase and phase to be defined != NoPhase, // that's why it is placed here. @@ -332,10 +328,13 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable symSource.clear; symData.clear; reporter.resetCounters(); + phase = firstPhase; + while (phase != terminalPhase) { phase.resetPhase; phase = phase.next } + for (val source <- sources) addUnit(new CompilationUnit(source)); - globalPhase = NoPhase.next; + globalPhase = firstPhase; while (globalPhase != terminalPhase && reporter.errors() == 0) { val startTime = System.currentTimeMillis(); phase = globalPhase; @@ -367,6 +366,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable writeSymblFile(sym, pickled) } } + currentRun = currentRun + 1; } else { for (val Pair(sym, file) <- symSource.elements) { sym.reset(new loaders.SourcefileLoader(file)); |