diff options
| author | 2011-09-18 01:38:59 -0700 | |
|---|---|---|
| committer | 2011-09-18 01:56:40 -0700 | |
| commit | 5b8e4c810a97c9dc417142b8c6e07871ae15c797 (patch) | |
| tree | 1a28a30bfca5e29d2abb33ad8fa27e66ab9beae9 /src/java_lang_System.cc | |
| parent | 3a7b4f26387b3529899f3cf16cdd6f1e200ded80 (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.cc | 6 |
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; |