diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-10-11 08:18:56 +0000 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2009-10-11 08:18:56 +0000 |
commit | 71f8dd24a0c1daa4ddbd4abf86c01b2ad7c36b7b (patch) | |
tree | c26e51b82bfa1c6b902ade88b11286251184106e /src | |
parent | 2de36ff1400ff4b68a62d91d2f3344db20742b58 (diff) | |
download | scala-71f8dd24a0c1daa4ddbd4abf86c01b2ad7c36b7b.tar.gz scala-71f8dd24a0c1daa4ddbd4abf86c01b2ad7c36b7b.tar.bz2 scala-71f8dd24a0c1daa4ddbd4abf86c01b2ad7c36b7b.zip |
use arraycopy from Platform (for msil)
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/collection/immutable/Vector.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/library/scala/collection/immutable/Vector.scala b/src/library/scala/collection/immutable/Vector.scala index f81e200d65..6a20afca8e 100644 --- a/src/library/scala/collection/immutable/Vector.scala +++ b/src/library/scala/collection/immutable/Vector.scala @@ -20,6 +20,7 @@ package scala.collection package immutable import scala.annotation.unchecked.uncheckedVariance +import compat.Platform.arraycopy import scala.collection.generic._ import scala.collection.mutable.Builder @@ -243,7 +244,7 @@ trait VectorPointer[T] { final def copyOf(a: Array[AnyRef]) = { // //println("copy") val b = new Array[AnyRef](a.length) - System.arraycopy(a, 0, b, 0, a.length) + arraycopy(a, 0, b, 0, a.length) b } @@ -662,7 +663,7 @@ class VectorImpl[+A](startIndex: Int, endIndex: Int, focus: Int) extends Vector[ private def copyRange(array: Array[AnyRef], oldLeft: Int, newLeft: Int) = { val elems = new Array[AnyRef](32) - System.arraycopy(array, oldLeft, elems, newLeft, 32 - Math.max(newLeft,oldLeft)) + arraycopy(array, oldLeft, elems, newLeft, 32 - Math.max(newLeft,oldLeft)) elems } |