summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2004-11-16 16:49:14 +0000
committermihaylov <mihaylov@epfl.ch>2004-11-16 16:49:14 +0000
commit89f45612e82264f5a36b61154651fe5077658ef8 (patch)
tree0260ed1973340a8a340d5bd92f89ab86f499722b /sources
parent1deb28f0007c31b345a3f54f23077ac9e013babf (diff)
downloadscala-89f45612e82264f5a36b61154651fe5077658ef8.tar.gz
scala-89f45612e82264f5a36b61154651fe5077658ef8.tar.bz2
scala-89f45612e82264f5a36b61154651fe5077658ef8.zip
[MSIL] Used scala.runtime.compat.Platform to av...
[MSIL] Used scala.runtime.compat.Platform to avoid platform dependency
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/Enumeration.scala2
-rw-r--r--sources/scala/util/automata/BaseBerrySethi.scala9
2 files changed, 6 insertions, 5 deletions
diff --git a/sources/scala/Enumeration.scala b/sources/scala/Enumeration.scala
index 09df27413e..90335ca4db 100644
--- a/sources/scala/Enumeration.scala
+++ b/sources/scala/Enumeration.scala
@@ -42,7 +42,7 @@ abstract class Enumeration(initial: Int, names: String*) {
def this(names: String*) = this(0, names: _*);
def name = {
- val cname = getClass().getName();
+ val cname = scala.runtime.compat.Platform.getClassName(this);
if (cname.endsWith("$"))
cname.substring(0, cname.length() - 1);
else if (cname.endsWith("$class"))
diff --git a/sources/scala/util/automata/BaseBerrySethi.scala b/sources/scala/util/automata/BaseBerrySethi.scala
index 99bc193d91..864a0d479b 100644
--- a/sources/scala/util/automata/BaseBerrySethi.scala
+++ b/sources/scala/util/automata/BaseBerrySethi.scala
@@ -4,6 +4,7 @@ import scala.util.regexp.Base;
import scala.collection.mutable;
import scala.collection.immutable;
+import scala.runtime.compat.Platform;
/** this turns a regexp over A into a NondetWorkAutom over A using the
* celebrated position automata construction (also called Berry-Sethi or
@@ -53,7 +54,7 @@ abstract class BaseBerrySethi {
return tmp
};
tmp
- case _ => error("unexpected pattern "+r.getClass());
+ case _ => error("unexpected pattern " + Platform.getClass(r));
}
/** computes last( r ) for the regexp r */
@@ -77,7 +78,7 @@ abstract class BaseBerrySethi {
};
tmp
case Star(t) => compLast(t);
- case _ => error("unexpected pattern " + r.getClass());
+ case _ => error("unexpected pattern " + Platform.getClass(r));
}
// starts from the right-to-left
@@ -145,7 +146,7 @@ abstract class BaseBerrySethi {
}
first;
- case _ => error("unexpected pattern: "+r.getClass());
+ case _ => error("unexpected pattern: " + Platform.getClass(r));
}
}
@@ -170,7 +171,7 @@ abstract class BaseBerrySethi {
case Star(t) =>
traverse(t)
- case _ => error("unexp pattern "+ r.getClass());
+ case _ => error("unexp pattern " + Platform.getClass(r));
}
}