summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2005-09-27 07:34:58 +0000
committermihaylov <mihaylov@epfl.ch>2005-09-27 07:34:58 +0000
commitd47ab5bff5e3ffa743bd646aa6e4160cf3980acd (patch)
tree2cf10d2fc56b445d1695d1db22237d63a43bbe28 /sources
parent88aad851bfc181f4755a2c0d560618135c26b169 (diff)
downloadscala-d47ab5bff5e3ffa743bd646aa6e4160cf3980acd.tar.gz
scala-d47ab5bff5e3ffa743bd646aa6e4160cf3980acd.tar.bz2
scala-d47ab5bff5e3ffa743bd646aa6e4160cf3980acd.zip
Made platform independant
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/collection/immutable/BitSet.scala6
-rw-r--r--sources/scala/collection/mutable/BitSet.scala3
-rw-r--r--sources/scala/collection/mutable/ResizableArray.scala2
3 files changed, 6 insertions, 5 deletions
diff --git a/sources/scala/collection/immutable/BitSet.scala b/sources/scala/collection/immutable/BitSet.scala
index 0db31f621f..8835fde146 100644
--- a/sources/scala/collection/immutable/BitSet.scala
+++ b/sources/scala/collection/immutable/BitSet.scala
@@ -23,7 +23,7 @@ package scala.collection.immutable;
*/
[serializable]
class BitSet(n:Int, ba: Array[Int], copy: Boolean) extends collection.BitSet with Ordered[BitSet] {
-
+ import scala.runtime.compat.Platform.arraycopy;
/** lexicographic ordering */
def compareTo [b >: BitSet <% Ordered[b]](other: b): int = other match {
case that:BitSet =>
@@ -59,7 +59,7 @@ class BitSet(n:Int, ba: Array[Int], copy: Boolean) extends collection.BitSet wit
protected val array: Array[Int] =
if (copy) {
val arr = new Array[Int](ba.length);
- java.lang.System.arraycopy(ba, 0, arr, 0, ba.length);
+ arraycopy(ba, 0, arr, 0, ba.length);
arr
}
else
@@ -110,7 +110,7 @@ class BitSet(n:Int, ba: Array[Int], copy: Boolean) extends collection.BitSet wit
def toArray: Array[Int] = {
val arr = new Array[Int](array.length);
- java.lang.System.arraycopy(arr, 0, array, 0, array.length);
+ arraycopy(arr, 0, array, 0, array.length);
arr
}
}
diff --git a/sources/scala/collection/mutable/BitSet.scala b/sources/scala/collection/mutable/BitSet.scala
index b16114a795..40d0bf0529 100644
--- a/sources/scala/collection/mutable/BitSet.scala
+++ b/sources/scala/collection/mutable/BitSet.scala
@@ -16,6 +16,7 @@ package scala.collection.mutable ;
*/
[serializable]
class BitSet(initSize: Int) extends scala.collection.BitSet {
+ import scala.runtime.compat.Platform.arraycopy;
/** default constructor, initial size of 512 bits */
def this() = this( 512 ); // ResizableArray.initialSize << 5
@@ -37,7 +38,7 @@ class BitSet(initSize: Int) extends scala.collection.BitSet {
}
def freeze: Array[Int] = {
val arr = new Array[Int]( array.length );
- java.lang.System.arraycopy(array, 0, arr, 0, arr.length);
+ arraycopy(array, 0, arr, 0, arr.length);
arr
}
}
diff --git a/sources/scala/collection/mutable/ResizableArray.scala b/sources/scala/collection/mutable/ResizableArray.scala
index 425db28c97..410722c56d 100644
--- a/sources/scala/collection/mutable/ResizableArray.scala
+++ b/sources/scala/collection/mutable/ResizableArray.scala
@@ -18,7 +18,7 @@ package scala.collection.mutable;
*/
[serializable]
abstract class ResizableArray[A] extends AnyRef with Iterable[A] {
- import java.lang.System.arraycopy;
+ import scala.runtime.compat.Platform.arraycopy;
protected val initialSize: Int = 16;
protected var array: Array[A] = new Array[A](initialSize);