diff options
author | Matthias Zenger <mzenger@gmail.com> | 2003-07-02 12:40:42 +0000 |
---|---|---|
committer | Matthias Zenger <mzenger@gmail.com> | 2003-07-02 12:40:42 +0000 |
commit | 5bcdedd615aaa18c44b408db74776949f09e307d (patch) | |
tree | dffc1b3bbbe517a818c44cb19686fd0f5e6f876a /sources/scalac/backend | |
parent | 478c334b562ff810f424b8ac3cdfd7f9c868feab (diff) | |
download | scala-5bcdedd615aaa18c44b408db74776949f09e307d.tar.gz scala-5bcdedd615aaa18c44b408db74776949f09e307d.tar.bz2 scala-5bcdedd615aaa18c44b408db74776949f09e307d.zip |
Added a new apply method to each phase which al...
Added a new apply method to each phase which allows to apply only a
single compilation unit. For some phases this might probably not work
as it is right now. At some stage, these phases have to be adapted
accordingly.
Diffstat (limited to 'sources/scalac/backend')
-rw-r--r-- | sources/scalac/backend/jvm/GenJVMPhase.java | 8 | ||||
-rw-r--r-- | sources/scalac/backend/msil/GenMSILPhase.java | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sources/scalac/backend/jvm/GenJVMPhase.java b/sources/scalac/backend/jvm/GenJVMPhase.java index 26e89581ef..c45e2935c6 100644 --- a/sources/scalac/backend/jvm/GenJVMPhase.java +++ b/sources/scalac/backend/jvm/GenJVMPhase.java @@ -30,9 +30,11 @@ public class GenJVMPhase extends PhaseDescriptor { } public void apply(Global global) { - for (int i = 0; i < global.units.length; i++) { - new GenJVM(global).translate(global.units[i]); - } + for (int i = 0; i < global.units.length; i++) + apply(global.units[i]); } + public void apply(Unit unit) { + new GenJVM(unit.global).translate(unit); + } } diff --git a/sources/scalac/backend/msil/GenMSILPhase.java b/sources/scalac/backend/msil/GenMSILPhase.java index aa931a693b..0e814e2346 100644 --- a/sources/scalac/backend/msil/GenMSILPhase.java +++ b/sources/scalac/backend/msil/GenMSILPhase.java @@ -40,4 +40,7 @@ public class GenMSILPhase extends PhaseDescriptor { new GenMSIL(global, this).apply(); } + public void apply(Unit unit) { + new GenMSIL(unit.global, this).apply(unit); + } } |