summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorRex Kerr <ichoran@gmail.com>2016-11-09 19:02:14 -0800
committerRex Kerr <ichoran@gmail.com>2016-11-09 19:02:14 -0800
commit7f26b4405e92e2117c942f102d2268c52263014d (patch)
treeb04a7d30d461e2e90c431a09ddbd49958424e011 /src/reflect
parente5fd42d60a8eee70e2e4fa1c141557924115763d (diff)
downloadscala-7f26b4405e92e2117c942f102d2268c52263014d.tar.gz
scala-7f26b4405e92e2117c942f102d2268c52263014d.tar.bz2
scala-7f26b4405e92e2117c942f102d2268c52263014d.zip
Manually inlined all other instances of Platform.arraycopy to System.arraycopy
to avoid the same kind of slowdowns that Vector was experiencing due to the less aggressive inlining by scalac.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/internal/BaseTypeSeqs.scala2
-rw-r--r--src/reflect/scala/reflect/internal/Names.scala4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/reflect/scala/reflect/internal/BaseTypeSeqs.scala b/src/reflect/scala/reflect/internal/BaseTypeSeqs.scala
index 78f9721713..0ef52213e5 100644
--- a/src/reflect/scala/reflect/internal/BaseTypeSeqs.scala
+++ b/src/reflect/scala/reflect/internal/BaseTypeSeqs.scala
@@ -100,7 +100,7 @@ trait BaseTypeSeqs {
def copy(head: Type, offset: Int): BaseTypeSeq = {
val arr = new Array[Type](elems.length + offset)
- scala.compat.Platform.arraycopy(elems, 0, arr, offset, elems.length)
+ java.lang.System.arraycopy(elems, 0, arr, offset, elems.length)
arr(0) = head
newBaseTypeSeq(parents, arr)
}
diff --git a/src/reflect/scala/reflect/internal/Names.scala b/src/reflect/scala/reflect/internal/Names.scala
index 97f51149ba..9d39ef8b42 100644
--- a/src/reflect/scala/reflect/internal/Names.scala
+++ b/src/reflect/scala/reflect/internal/Names.scala
@@ -68,7 +68,7 @@ trait Names extends api.Names {
while (i < len) {
if (nc + i == chrs.length) {
val newchrs = new Array[Char](chrs.length * 2)
- scala.compat.Platform.arraycopy(chrs, 0, newchrs, 0, chrs.length)
+ java.lang.System.arraycopy(chrs, 0, newchrs, 0, chrs.length)
chrs = newchrs
}
chrs(nc + i) = cs(offset + i)
@@ -220,7 +220,7 @@ trait Names extends api.Names {
/** Copy bytes of this name to buffer cs, starting at position `offset`. */
final def copyChars(cs: Array[Char], offset: Int) =
- scala.compat.Platform.arraycopy(chrs, index, cs, offset, len)
+ java.lang.System.arraycopy(chrs, index, cs, offset, len)
/** @return the ascii representation of this name */
final def toChars: Array[Char] = { // used by ide