8198285: More consistent Access API for arraycopy

Reviewed-by: eosterlund, shade
This commit is contained in:
Roman Kennke 2018-06-04 23:01:48 +02:00
parent 9017043b57
commit 482e40cc8c
20 changed files with 357 additions and 149 deletions

View file

@ -762,8 +762,8 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
// 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);
ArrayAccess<>::arraycopy_to_native(arrayOop(JNIHandles::resolve_non_null(data)), typeArrayOopDesc::element_offset<jbyte>(0),
reinterpret_cast<jbyte*>(class_bytes), length);
objArrayHandle cp_patches_h;
if (cp_patches_jh != NULL) {