summaryrefslogtreecommitdiff
path: root/sources/scalac/backend/msil
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-03-21 17:51:47 +0000
committerpaltherr <paltherr@epfl.ch>2003-03-21 17:51:47 +0000
commit0aa9fd3d2ec47666e223f091bdee878bd1b0aacb (patch)
tree63319e660c57a64894697ad49f093f4cda694b90 /sources/scalac/backend/msil
parente2a09f258a66f71ea90e65b645d8a03b1a64be71 (diff)
downloadscala-0aa9fd3d2ec47666e223f091bdee878bd1b0aacb.tar.gz
scala-0aa9fd3d2ec47666e223f091bdee878bd1b0aacb.tar.bz2
scala-0aa9fd3d2ec47666e223f091bdee878bd1b0aacb.zip
- Removed class Phase.
- Removed argument descr in constructors of the class Transformer and of its subclasses.
Diffstat (limited to 'sources/scalac/backend/msil')
-rw-r--r--sources/scalac/backend/msil/GenMSIL.java16
-rw-r--r--sources/scalac/backend/msil/GenMSILPhase.java1
-rw-r--r--sources/scalac/backend/msil/TypeCreator.java7
3 files changed, 11 insertions, 13 deletions
diff --git a/sources/scalac/backend/msil/GenMSIL.java b/sources/scalac/backend/msil/GenMSIL.java
index e126b72216..5d405641d2 100644
--- a/sources/scalac/backend/msil/GenMSIL.java
+++ b/sources/scalac/backend/msil/GenMSIL.java
@@ -2,17 +2,14 @@
** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
** /_____/\____/\___/\____/____/ **
-** **
-** $Id$
\* */
+// $Id$
package scalac.backend.msil;
import scalac.Global;
import scalac.Unit;
-import scalac.Phase;
-import scalac.PhaseDescriptor;
import scalac.ApplicationError;
import scalac.util.Debug;
@@ -50,7 +47,7 @@ import java.io.IOException;
* @author Nikolay Mihaylov
*/
-public class GenMSIL extends Phase /*implements Modifiers */ {
+public class GenMSIL /*implements Modifiers */ {
final Map assemblies;
@@ -62,6 +59,7 @@ public class GenMSIL extends Phase /*implements Modifiers */ {
ILGenerator code;
+ final Global global;
final TypeCreator tc;
final Definitions defs;
final Primitives primitives;
@@ -104,12 +102,12 @@ public class GenMSIL extends Phase /*implements Modifiers */ {
/**
*/
public GenMSIL(Global global, GenMSILPhase phase) {
- super(global, phase);
+ this.global = global;
defs = global.definitions;
primitives = global.primitives;
assemblies = phase.assemblies;
- tc = new TypeCreator(this);
+ tc = new TypeCreator(this, phase);
items = new ItemFactory(this);
currentPackage = defs.ROOT_CLASS; /// ???
@@ -158,7 +156,9 @@ public class GenMSIL extends Phase /*implements Modifiers */ {
tc.traverse(global.units);
try {
- super.apply(); // this invokes apply(Unit) for each Unit
+ for (int i = 0; i < global.units.length; i++) {
+ apply(global.units[i]);
+ }
} catch (Throwable e) {
//log("params: " + params);
//log("locals: " + locals);
diff --git a/sources/scalac/backend/msil/GenMSILPhase.java b/sources/scalac/backend/msil/GenMSILPhase.java
index 3156db748d..aa931a693b 100644
--- a/sources/scalac/backend/msil/GenMSILPhase.java
+++ b/sources/scalac/backend/msil/GenMSILPhase.java
@@ -10,7 +10,6 @@ package scalac.backend.msil;
import scalac.Global;
import scalac.Unit;
-import scalac.Phase;
import scalac.PhaseDescriptor;
import java.util.HashMap;
diff --git a/sources/scalac/backend/msil/TypeCreator.java b/sources/scalac/backend/msil/TypeCreator.java
index aff49c99fc..e89bff38de 100644
--- a/sources/scalac/backend/msil/TypeCreator.java
+++ b/sources/scalac/backend/msil/TypeCreator.java
@@ -2,10 +2,10 @@
** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
** /_____/\____/\___/\____/____/ **
-** **
-** $Id$
\* */
+// $Id$
+
package scalac.backend.msil;
import scalac.Global;
@@ -98,12 +98,11 @@ public final class TypeCreator
throw Debug.abort(e); }
}
- TypeCreator(GenMSIL _gen) {
+ TypeCreator(GenMSIL _gen, GenMSILPhase phase) {
gen = _gen;
global = gen.global;
defs = global.definitions;
- GenMSILPhase phase = (GenMSILPhase) gen.descr;
types2symbols = phase.types2symbols;
symbols2types = phase.symbols2types;
symbols2fields = phase.symbols2fields;