diff options
author | paltherr <paltherr@epfl.ch> | 2004-02-26 15:53:05 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-02-26 15:53:05 +0000 |
commit | b28470ad0e8d96c7ddab594a7992d76f500669da (patch) | |
tree | 6e5953f26a480dc9b870a271baca3fb9741c4ae6 /sources/scalac/Global.java | |
parent | c56fa9424412d12996ed73590cd7e05089f3e690 (diff) | |
download | scala-b28470ad0e8d96c7ddab594a7992d76f500669da.tar.gz scala-b28470ad0e8d96c7ddab594a7992d76f500669da.tar.bz2 scala-b28470ad0e8d96c7ddab594a7992d76f500669da.zip |
- Reorganized phase creation so that types are ...
- Reorganized phase creation so that types are not created before
Analyzer
Diffstat (limited to 'sources/scalac/Global.java')
-rw-r--r-- | sources/scalac/Global.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java index 88c36fcbb6..f581dac326 100644 --- a/sources/scalac/Global.java +++ b/sources/scalac/Global.java @@ -29,6 +29,7 @@ import scalac.backend.Primitives; import scalac.symtab.*; // !!! >>> Interpreter stuff import scalac.symtab.Definitions; +import scalac.typechecker.AnalyzerPhase; import scalac.typechecker.Infer; import scalac.util.*; @@ -126,7 +127,7 @@ public abstract class Global { /** the global primitives */ - public Primitives primitives; + public final Primitives primitives; /** compilation phases. */ @@ -234,11 +235,12 @@ public abstract class Global { PHASE.freeze(); PhaseDescriptor[] descriptors = PHASE.phases(); this.firstPhase = descriptors[0].create(this); - this.definitions = new Definitions(this); + for (int i = 1; i <= PHASE.ANALYZER.id(); i++) + if (!descriptors[i].hasSkipFlag()) descriptors[i].create(this); + this.treeGen = ((AnalyzerPhase)PHASE.ANALYZER.phase()).gen; this.primitives = new Primitives(this); - this.treeGen = new TreeGen(this, make); assert !descriptors[0].hasSkipFlag(); - for (int i = 1; i < descriptors.length; i++) + for (int i = PHASE.ANALYZER.id() + 1; i < descriptors.length; i++) if (!descriptors[i].hasSkipFlag()) descriptors[i].create(this); this.currentPhase = firstPhase; } |