summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorschinz <schinz@epfl.ch>2004-10-14 07:47:30 +0000
committerschinz <schinz@epfl.ch>2004-10-14 07:47:30 +0000
commitdd012e5461ae23ce388924fcc78cd438c6d8c322 (patch)
tree92a42bbae99b1b093addd54977f188734b4f5a9f /sources
parent96bc1b2e6f0a9497875a006e8dc9b1ca7cdc08ad (diff)
downloadscala-dd012e5461ae23ce388924fcc78cd438c6d8c322.tar.gz
scala-dd012e5461ae23ce388924fcc78cd438c6d8c322.tar.bz2
scala-dd012e5461ae23ce388924fcc78cd438c6d8c322.zip
- added option -Xrtt to enable support for run-...
- added option -Xrtt to enable support for run-time types
Diffstat (limited to 'sources')
-rw-r--r--sources/scalac/CompilerCommand.java5
-rw-r--r--sources/scalac/Global.java3
2 files changed, 8 insertions, 0 deletions
diff --git a/sources/scalac/CompilerCommand.java b/sources/scalac/CompilerCommand.java
index 1e014ee452..d2e244b271 100644
--- a/sources/scalac/CompilerCommand.java
+++ b/sources/scalac/CompilerCommand.java
@@ -85,6 +85,7 @@ public class CompilerCommand extends CommandParser {
public final BooleanOptionParser Xmarkup;
public final BooleanOptionParser Xnewmatch;
public final BooleanOptionParser XpreserveWS;
+ public final BooleanOptionParser XrunTimeTypes;
/*
* Whole-program optimization options
@@ -279,6 +280,10 @@ public class CompilerCommand extends CommandParser {
"Xinline", "Inline method calls that can be resolved statically",
false),
+ this.XrunTimeTypes = new BooleanOptionParser(this,
+ "Xrtt", "Enable run-time types",
+ false),
+
this.unknown_options = new UnknownOptionParser(this),
this.files = new ScalaFileArgumentParser(this),
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index 469aa9ef89..93a19ff47e 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -64,6 +64,7 @@ public abstract class Global {
public final boolean uniqid;
public final boolean newMatch;
public final boolean xmlPreserveWS;
+ public final boolean runTimeTypes;
public final boolean printtypes;
public final boolean printtokens;
@@ -222,6 +223,7 @@ public abstract class Global {
this.uniqid = args.uniqid.value;
this.newMatch = args.Xnewmatch.value;
this.xmlPreserveWS = args.XpreserveWS.value;
+ this.runTimeTypes = args.XrunTimeTypes.value;
this.explaintypes = args.explaintypes.value;
this.printtypes = args.types.value;
this.printtokens = args.print.tokens;
@@ -271,6 +273,7 @@ public abstract class Global {
this.PHASE = args.phases;
// if (!optimize) PHASE.remove(args.phases.OPTIMIZE);
// TODO: Enable TailCall for other backends when they handle LabelDefs
+ if (!runTimeTypes) args.phases.TYPESASVALUES.addSkipFlag();
if (target != TARGET_MSIL) args.phases.GENMSIL.addSkipFlag();
if (target != TARGET_JVM) args.phases.GENJVM.addSkipFlag();
if (target != TARGET_JVMFROMICODE) {