summaryrefslogtreecommitdiff
path: root/sources/scalac/Global.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-12-08 15:31:38 +0000
committerpaltherr <paltherr@epfl.ch>2004-12-08 15:31:38 +0000
commita0a569dfb76080df049e2ca27c27d696c848f5f9 (patch)
treec139758f2631bba1dcf44026b1288dd3b1287538 /sources/scalac/Global.java
parent1aa40dd9e33751be7fd1e25bbc178b3937f01b54 (diff)
downloadscala-a0a569dfb76080df049e2ca27c27d696c848f5f9.tar.gz
scala-a0a569dfb76080df049e2ca27c27d696c848f5f9.tar.bz2
scala-a0a569dfb76080df049e2ca27c27d696c848f5f9.zip
- Disabled WholeProgPhase
- Removed method Phase.apply(CompilationUnit[])
Diffstat (limited to 'sources/scalac/Global.java')
-rw-r--r--sources/scalac/Global.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index 141d6ec140..dcf8d182fd 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -270,6 +270,7 @@ public abstract class Global {
}
this.make = new DefaultTreeFactory();
this.PHASE = args.phases;
+ args.phases.WHOLEPROG.addSkipFlag(); // !!!
// if (!optimize) PHASE.remove(args.phases.OPTIMIZE);
// TODO: Enable TailCall for other backends when they handle LabelDefs
if (!runTimeTypes) args.phases.TYPESASVALUES.addSkipFlag();
@@ -381,7 +382,8 @@ public abstract class Global {
currentPhase = currentPhase.next;
start();
// System.out.println("*** " + currentPhase.descriptor.description() + " ***");
- currentPhase.apply(units);
+ for (int i = 0; i < units.length; i++)
+ currentPhase.apply(units[i]);
if (currentPhase == PHASE.ANALYZER.phase())
units = ((AnalyzerPhase)currentPhase).getUnits();
stop(currentPhase.descriptor.taskDescription());
@@ -413,7 +415,7 @@ public abstract class Global {
Phase backup = currentPhase;
// !!! add code to print/skip/graph as in compile
currentPhase = PHASE.PARSER.phase();
- PHASE.PARSER.phase().apply(new CompilationUnit[] {unit});
+ PHASE.PARSER.phase().apply(unit);
currentPhase = PHASE.ANALYZER.phase();
((AnalyzerPhase)PHASE.ANALYZER.phase()).apply(unit);
// !!! add code for later phases?