src/share/vm/oops/typeArrayOop.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8140685.02 Cdiff src/share/vm/oops/typeArrayOop.hpp
src/share/vm/oops/typeArrayOop.hpp
Print this page
*** 37,47 ****
--- 37,49 ----
protected:
jchar* char_base() const { return (jchar*) base(T_CHAR); }
jboolean* bool_base() const { return (jboolean*)base(T_BOOLEAN); }
jbyte* byte_base() const { return (jbyte*) base(T_BYTE); }
jint* int_base() const { return (jint*) base(T_INT); }
+ juint* uint_base() const { return (juint*) base(T_INT); }
jlong* long_base() const { return (jlong*) base(T_LONG); }
+ julong* ulong_base() const { return (julong*) base(T_LONG); }
jshort* short_base() const { return (jshort*) base(T_SHORT); }
jfloat* float_base() const { return (jfloat*) base(T_FLOAT); }
jdouble* double_base() const { return (jdouble*) base(T_DOUBLE); }
friend class TypeArrayKlass;
*** 65,74 ****
--- 67,81 ----
jint* int_at_addr(int which) const {
assert(is_within_bounds(which), "index out of bounds");
return &int_base()[which];
}
+ juint* uint_at_addr(int which) const {
+ assert(is_within_bounds(which), "index out of bounds");
+ return (juint*)&uint_base()[which];
+ }
+
jshort* short_at_addr(int which) const {
assert(is_within_bounds(which), "index out of bounds");
return &short_base()[which];
}
*** 80,89 ****
--- 87,101 ----
jlong* long_at_addr(int which) const {
assert(is_within_bounds(which), "index out of bounds");
return &long_base()[which];
}
+ julong* ulong_at_addr(int which) const {
+ assert(is_within_bounds(which), "index out of bounds");
+ return (julong*) &ulong_base()[which];
+ }
+
jfloat* float_at_addr(int which) const {
assert(is_within_bounds(which), "index out of bounds");
return &float_base()[which];
}
*** 120,143 ****
void double_at_put(int which, jdouble contents) { *double_at_addr(which) = contents; }
jbyte byte_at_acquire(int which) const { return OrderAccess::load_acquire(byte_at_addr(which)); }
void release_byte_at_put(int which, jbyte contents) { OrderAccess::release_store(byte_at_addr(which), contents); }
! // Java thinks metadata arrays are just arrays of either long or int, since
// there doesn't seem to be T_ADDRESS, so this is a bit of unfortunate
// casting
#ifdef _LP64
! Metadata* metadata_at(int which) const {
! return (Metadata*)*long_at_addr(which); }
! void metadata_at_put(int which, Metadata* contents) {
! *long_at_addr(which) = (long)contents;
}
#else
! Metadata* metadata_at(int which) const {
! return (Metadata*)*int_at_addr(which); }
! void metadata_at_put(int which, Metadata* contents) {
! *int_at_addr(which) = (int)contents;
}
#endif // _LP64
// Sizing
--- 132,155 ----
void double_at_put(int which, jdouble contents) { *double_at_addr(which) = contents; }
jbyte byte_at_acquire(int which) const { return OrderAccess::load_acquire(byte_at_addr(which)); }
void release_byte_at_put(int which, jbyte contents) { OrderAccess::release_store(byte_at_addr(which), contents); }
! // Java thinks Symbol* arrays are just arrays of either long or int, since
// there doesn't seem to be T_ADDRESS, so this is a bit of unfortunate
// casting
#ifdef _LP64
! Symbol* symbol_at(int which) const {
! return (Symbol*)*ulong_at_addr(which); }
! void symbol_at_put(int which, Symbol* contents) {
! *ulong_at_addr(which) = (julong)contents;
}
#else
! Symbol* symbol_at(int which) const {
! return (Symbol*)*uint_at_addr(which); }
! void symbol_at_put(int which, Symbol* contents) {
! *uint_at_addr(which) = (juint)contents;
}
#endif // _LP64
// Sizing
src/share/vm/oops/typeArrayOop.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File