--- old/src/share/vm/oops/typeArrayOop.hpp 2015-11-16 17:05:16.542599672 -0500 +++ new/src/share/vm/oops/typeArrayOop.hpp 2015-11-16 17:05:16.020521721 -0500 @@ -39,7 +39,9 @@ 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); } @@ -67,6 +69,11 @@ 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]; @@ -82,6 +89,11 @@ 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]; @@ -122,20 +134,20 @@ 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 + // 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 - 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; + 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 - 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; + 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