From 26caccbea4f45849b1b9ca735dbf2d8181990ffc Mon Sep 17 00:00:00 2001 From: paltherr Date: Mon, 24 Mar 2003 13:54:19 +0000 Subject: - Removed java-backend (jaco) specific stuff --- sources/scala/tools/scalai/InterpreterCommand.java | 1 - sources/scalac/CompilerCommand.java | 5 ----- sources/scalac/Global.java | 5 ----- sources/scalac/transformer/Erasure.java | 7 ++----- 4 files changed, 2 insertions(+), 16 deletions(-) (limited to 'sources') diff --git a/sources/scala/tools/scalai/InterpreterCommand.java b/sources/scala/tools/scalai/InterpreterCommand.java index 46704311e0..a95f529879 100644 --- a/sources/scala/tools/scalai/InterpreterCommand.java +++ b/sources/scala/tools/scalai/InterpreterCommand.java @@ -51,7 +51,6 @@ public class InterpreterCommand extends CompilerCommand { remove(outpath); remove(target); - remove(jaco); add(0, interactive); add(1, emacs); diff --git a/sources/scalac/CompilerCommand.java b/sources/scalac/CompilerCommand.java index 903660490b..6aaa94a894 100644 --- a/sources/scalac/CompilerCommand.java +++ b/sources/scalac/CompilerCommand.java @@ -48,7 +48,6 @@ public class CompilerCommand extends CommandParser { public final ChoiceOptionParser target; public final BooleanOptionParser noimports; public final BooleanOptionParser nopredefs; - public final StringOptionParser jaco; public final PhaseSetOptionParser skip; public final PhaseSetOptionParser check; public final PrintOptionParser print; @@ -137,10 +136,6 @@ public class CompilerCommand extends CommandParser { "nopredefs", "Compile without any implicit predefined values", false), - this.jaco = new StringOptionParser(this, - "jaco", "Pass argument to jaco backend (debugging option)", - "argument", null), - this.skip = new PhaseSetOptionParser(this, "skip", "Skip (see below)", phases.phases, PhaseDescriptor.SKIP), diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java index f068ec201f..c90332137b 100644 --- a/sources/scalac/Global.java +++ b/sources/scalac/Global.java @@ -44,8 +44,6 @@ public class Global { public final String outpath; public final String target; - public final String jacoDebug; - /** the message reporter */ public final Reporter reporter; @@ -110,13 +108,11 @@ public class Global { /** compilation targets */ public static final String TARGET_INT; - public static final String TARGET_JAVA; public static final String TARGET_JVM; public static final String TARGET_MSIL; public static final String[] TARGETS = new String[] { TARGET_INT = "int".intern(), - TARGET_JAVA = "java".intern(), TARGET_JVM = "jvm".intern(), TARGET_MSIL = "msil".intern(), }; @@ -153,7 +149,6 @@ public class Global { this.classPath = args.classpath(); this.outpath = args.outpath(); this.target = interpret ? TARGET_INT : args.target.value.intern(); - this.jacoDebug = args.jaco.value; this.uniqueID = new UniqueID(); String printFile = args.printfile.value; try { diff --git a/sources/scalac/transformer/Erasure.java b/sources/scalac/transformer/Erasure.java index 2ac7fdd5eb..a72710f2dc 100644 --- a/sources/scalac/transformer/Erasure.java +++ b/sources/scalac/transformer/Erasure.java @@ -48,7 +48,6 @@ public class Erasure extends Transformer implements Modifiers { private final Definitions definitions; private final Primitives primitives; - private final boolean noTyped; private Unit unit; @@ -56,7 +55,6 @@ public class Erasure extends Transformer implements Modifiers { super(global); this.definitions = global.definitions; this.primitives = global.primitives; - this.noTyped = global.target != global.TARGET_JAVA; } public void apply(Unit unit) { @@ -183,7 +181,7 @@ public class Erasure extends Transformer implements Modifiers { if (isSameAs(tree.type, pt)) { return tree; } else if (isSubType(tree.type, pt)) { - return noTyped ? tree : gen.Typed(tree, pt); + return tree; } else if (isUnboxed(tree.type) && !isUnboxed(pt)) { return cast(box(tree), pt); } else if ((isUnboxedArray(tree.type) @@ -406,8 +404,7 @@ public class Erasure extends Transformer implements Modifiers { // !!! More generally, we should never transform a tree // that represents a type. We should always transform // types and then reconstruct the corresponding tree. - Tree expr1 = transform(expr, tpe1.type); - return noTyped ? expr1 : copy.Typed(tree, expr1, tpe1).setType(owntype); + return transform(expr, tpe1.type); case TypeApply(Tree fun, Tree[] args): Symbol sym = fun.symbol(); -- cgit v1.2.3