summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/list/library-msil.lst3
-rw-r--r--config/list/library.lst1
-rw-r--r--sources/scala/runtime/compat/Math.scala21
-rw-r--r--sources/scala/runtime/compat/Platform.scala10
4 files changed, 29 insertions, 6 deletions
diff --git a/config/list/library-msil.lst b/config/list/library-msil.lst
index c262dd9848..6dd8fab873 100644
--- a/config/list/library-msil.lst
+++ b/config/list/library-msil.lst
@@ -3,6 +3,7 @@
##############################################################################
# $Id$
+_trait_.scala
AnyVal.cs
Application.scala
Array.cs
@@ -178,6 +179,8 @@ runtime/MetaAttribute.cs
runtime/RunTime.cs
runtime/SymtabAttribute.cs
../msil/scala/runtime/ScalaRunTime.scala
+
+../msil/scala/runtime/compat/Math.scala
../msil/scala/runtime/compat/Platform.scala
runtime/matching/Address.scala
diff --git a/config/list/library.lst b/config/list/library.lst
index 3bc4cfe3f4..1fbde5f521 100644
--- a/config/list/library.lst
+++ b/config/list/library.lst
@@ -192,6 +192,7 @@ runtime/RunTime.java
runtime/ScalaRunTime.scala
runtime/ShortRef.java
+runtime/compat/Math.scala
runtime/compat/Platform.scala
#runtime/distributed/Channel.java
diff --git a/sources/scala/runtime/compat/Math.scala b/sources/scala/runtime/compat/Math.scala
new file mode 100644
index 0000000000..22243f0e00
--- /dev/null
+++ b/sources/scala/runtime/compat/Math.scala
@@ -0,0 +1,21 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2005, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+
+package scala.runtime.compat;
+
+object Math {
+ val MAX_INT = java.lang.Integer.MAX_VALUE;
+ val MIN_INT = java.lang.Integer.MIN_VALUE;
+
+ def log(x: Double): Double = Math.log(x);
+ def max(x: Int, y: Int): Int = Math.max(x, y);
+ def sqrt(x: Double): Double = Math.sqrt(s);
+}
diff --git a/sources/scala/runtime/compat/Platform.scala b/sources/scala/runtime/compat/Platform.scala
index df90345c5c..5ef3f8ecd5 100644
--- a/sources/scala/runtime/compat/Platform.scala
+++ b/sources/scala/runtime/compat/Platform.scala
@@ -1,6 +1,6 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2002-2004, LAMP/EPFL **
+** / __/ __// _ | / / / _ | (c) 2002-2005, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
@@ -12,6 +12,8 @@
package scala.runtime.compat;
object Platform {
+ def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: int): Unit =
+ System.arraycopy(src, srcPos, dest, destPos, length);
def getClass(obj: AnyRef) = obj.getClass();
def getClassName(obj: AnyRef) = obj.getClass().getName();
def printStackTrace(exc: java.lang.Throwable) = exc.printStackTrace();
@@ -26,9 +28,5 @@ object Platform {
def parseFloat(s: String): Float = java.lang.Float.parseFloat(s);
def parseDouble(s: String): Double = java.lang.Double.parseDouble(s);
- def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: int): Unit =
- System.arraycopy(src, srcPos, dest, destPos, length);
-
- val MAX_INT = java.lang.Integer.MAX_VALUE;
- def max(x: Int, y: Int): Int = Math.max(x, y);
+ def isDigit(c: Char): Boolean = java.lang.Character.isDigit(c);
}