From b28470ad0e8d96c7ddab594a7992d76f500669da Mon Sep 17 00:00:00 2001 From: paltherr Date: Thu, 26 Feb 2004 15:53:05 +0000 Subject: - Reorganized phase creation so that types are ... - Reorganized phase creation so that types are not created before Analyzer --- sources/scalac/Global.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sources/scalac/Global.java') 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; } -- cgit v1.2.3