< prev index next >
src/hotspot/share/prims/unsafe.cpp
Print this page
rev 49674 : 8198285: More consistent Access API for arraycopy
*** 760,771 ****
}
// caller responsible to free it:
*temp_alloc = class_bytes;
! jbyte* array_base = typeArrayOop(JNIHandles::resolve_non_null(data))->byte_at_addr(0);
! Copy::conjoint_jbytes(array_base, class_bytes, length);
objArrayHandle cp_patches_h;
if (cp_patches_jh != NULL) {
oop p = JNIHandles::resolve_non_null(cp_patches_jh);
assert(p->is_objArray(), "cp_patches must be an object[]");
--- 760,771 ----
}
// caller responsible to free it:
*temp_alloc = class_bytes;
! HeapAccess<>::arraycopy<jbyte>(arrayOop(JNIHandles::resolve_non_null(data)), typeArrayOopDesc::element_offset<jbyte>(0), NULL,
! NULL, 0, reinterpret_cast<jbyte*>(class_bytes), length);
objArrayHandle cp_patches_h;
if (cp_patches_jh != NULL) {
oop p = JNIHandles::resolve_non_null(cp_patches_jh);
assert(p->is_objArray(), "cp_patches must be an object[]");
< prev index next >