diff options
author | paltherr <paltherr@epfl.ch> | 2005-01-25 10:27:42 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2005-01-25 10:27:42 +0000 |
commit | 9d73819ae72a83f0aaeb096c1fe7dd8f9aa05ca1 (patch) | |
tree | e2db345e513ede2ab712a3c62a6e89c4d4ead88b | |
parent | 402ee863034f31f45a76759e6e51c2713cb63af0 (diff) | |
download | scala-9d73819ae72a83f0aaeb096c1fe7dd8f9aa05ca1.tar.gz scala-9d73819ae72a83f0aaeb096c1fe7dd8f9aa05ca1.tar.bz2 scala-9d73819ae72a83f0aaeb096c1fe7dd8f9aa05ca1.zip |
- Added a dummy "codegen" phase to enable/disab...
- Added a dummy "codegen" phase to enable/disable code generation.
-rw-r--r-- | sources/scala/tools/scalac/Main.scala | 3 | ||||
-rw-r--r-- | sources/scalac/CompilerPhases.java | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sources/scala/tools/scalac/Main.scala b/sources/scala/tools/scalac/Main.scala index 2f020983e5..ae3c4e6258 100644 --- a/sources/scala/tools/scalac/Main.scala +++ b/sources/scala/tools/scalac/Main.scala @@ -43,7 +43,8 @@ object Main { if (ok) { val global = new Global(command); val units = global.compile(command.files.toArray(), false); - if (reporter.errors() == 0) global.dump(units); + if (reporter.errors() == 0) + if (!global.PHASE.CODEGEN.hasSkipFlag()) global.dump(units); global.stop("total"); global.reporter.printSummary(); } diff --git a/sources/scalac/CompilerPhases.java b/sources/scalac/CompilerPhases.java index 0e69a8c595..ec021a9f90 100644 --- a/sources/scalac/CompilerPhases.java +++ b/sources/scalac/CompilerPhases.java @@ -41,6 +41,7 @@ public abstract class CompilerPhases { public final PhaseDescriptor MAKEBOXINGEXPLICIT; public final PhaseDescriptor ERASURE; public final PhaseDescriptor ICODE; + public final PhaseDescriptor CODEGEN; public final PhaseDescriptor TERMINAL; //######################################################################## @@ -176,6 +177,11 @@ public abstract class CompilerPhases { "generate icode", "generated icode", ICODE_PHASE()), + this.CODEGEN = new PhaseDescriptor( + "codegen", + "enable code generation", + "code generation enabled", + scalac.util.EmptyPhase.class), this.TERMINAL = new PhaseDescriptor( "terminal", "compilation terminated", |