< prev index next >

src/share/vm/prims/unsafe.cpp

Print this page
rev 9081 : imported patch more.patch

*** 783,801 **** } } UNSAFE_ENTRY(jint, Unsafe_ArrayBaseOffset(JNIEnv *env, jobject unsafe, jclass acls)) UnsafeWrapper("Unsafe_ArrayBaseOffset"); ! int base, scale; getBaseAndScale(base, scale, acls, CHECK_0); return field_offset_from_byte_offset(base); UNSAFE_END UNSAFE_ENTRY(jint, Unsafe_ArrayIndexScale(JNIEnv *env, jobject unsafe, jclass acls)) UnsafeWrapper("Unsafe_ArrayIndexScale"); ! int base, scale; getBaseAndScale(base, scale, acls, CHECK_0); // This VM packs both fields and array elements down to the byte. // But watch out: If this changes, so that array references for // a given primitive type (say, T_BOOLEAN) use different memory units // than fields, this method MUST return zero for such arrays. --- 783,801 ---- } } UNSAFE_ENTRY(jint, Unsafe_ArrayBaseOffset(JNIEnv *env, jobject unsafe, jclass acls)) UnsafeWrapper("Unsafe_ArrayBaseOffset"); ! int base = 0, scale = 0; getBaseAndScale(base, scale, acls, CHECK_0); return field_offset_from_byte_offset(base); UNSAFE_END UNSAFE_ENTRY(jint, Unsafe_ArrayIndexScale(JNIEnv *env, jobject unsafe, jclass acls)) UnsafeWrapper("Unsafe_ArrayIndexScale"); ! int base = 0, scale = 0; getBaseAndScale(base, scale, acls, CHECK_0); // This VM packs both fields and array elements down to the byte. // But watch out: If this changes, so that array references for // a given primitive type (say, T_BOOLEAN) use different memory units // than fields, this method MUST return zero for such arrays.
< prev index next >