summaryrefslogtreecommitdiff
path: root/src/java_lang_System.cc
diff options
context:
space:
mode:
author Brian Carlstrom <bdc@google.com> 2011-09-18 01:38:59 -0700
committer Brian Carlstrom <bdc@google.com> 2011-09-18 01:56:40 -0700
commit5b8e4c810a97c9dc417142b8c6e07871ae15c797 (patch)
tree1a28a30bfca5e29d2abb33ad8fa27e66ab9beae9 /src/java_lang_System.cc
parent3a7b4f26387b3529899f3cf16cdd6f1e200ded80 (diff)
Change Class::component_type_ and implement reflect.Array
Change-Id: I9e06f31577551c738eca2621146c8d2328119442
Diffstat (limited to 'src/java_lang_System.cc')
-rw-r--r--src/java_lang_System.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java_lang_System.cc b/src/java_lang_System.cc
index fc13839d41..4eaaa6667a 100644
--- a/src/java_lang_System.cc
+++ b/src/java_lang_System.cc
@@ -182,10 +182,10 @@ void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, jobject
}
// Neither class is primitive. Are the types trivially compatible?
- const int width = sizeof(Object*);
- bool sameDimensions = srcArray->GetClass()->GetArrayRank() == dstArray->GetClass()->GetArrayRank();
- if (sameDimensions && srcComponentType->InstanceOf(dstComponentType)) {
+ const size_t width = sizeof(Object*);
+ if (dstComponentType->IsAssignableFrom(srcComponentType)) {
// Yes. Bulk copy.
+ DCHECK_EQ(width, sizeof(uint32_t));
move32(dstBytes + dstPos * width, srcBytes + srcPos * width, length * width);
Heap::WriteBarrier(dstArray);
return;