--- old/src/share/vm/oops/typeArrayOop.hpp 2017-04-25 16:45:29.367173299 +0200 +++ new/src/share/vm/oops/typeArrayOop.hpp 2017-04-25 16:45:29.219173304 +0200 @@ -44,6 +44,15 @@ jfloat* float_base() const { return (jfloat*) base(T_FLOAT); } jdouble* double_base() const { return (jdouble*) base(T_DOUBLE); } + static int char_at_offset(int index) { return base_offset_in_bytes(T_CHAR) + sizeof(jchar) * index; } + static int bool_at_offset(int index) { return base_offset_in_bytes(T_BOOLEAN) + sizeof(jboolean) * index; } + static int byte_at_offset(int index) { return base_offset_in_bytes(T_BYTE) + sizeof(jbyte) * index; } + static int int_at_offset(int index) { return base_offset_in_bytes(T_INT) + sizeof(jint) * index; } + static int long_at_offset(int index) { return base_offset_in_bytes(T_LONG) + sizeof(jlong) * index; } + static int short_at_offset(int index) { return base_offset_in_bytes(T_SHORT) + sizeof(jshort) * index; } + static int float_at_offset(int index) { return base_offset_in_bytes(T_FLOAT) + sizeof(jfloat) * index; } + static int double_at_offset(int index) { return base_offset_in_bytes(T_DOUBLE) + sizeof(jdouble) * index; } + friend class TypeArrayKlass; public: @@ -92,35 +101,35 @@ return &double_base()[which]; } - jbyte byte_at(int which) const { return *byte_at_addr(which); } - void byte_at_put(int which, jbyte contents) { *byte_at_addr(which) = contents; } + jbyte byte_at(int which) const; + void byte_at_put(int which, jbyte contents); - jboolean bool_at(int which) const { return *bool_at_addr(which); } - void bool_at_put(int which, jboolean contents) { *bool_at_addr(which) = (((jint)contents) & 1); } + jboolean bool_at(int which) const; + void bool_at_put(int which, jboolean contents); - jchar char_at(int which) const { return *char_at_addr(which); } - void char_at_put(int which, jchar contents) { *char_at_addr(which) = contents; } + jchar char_at(int which) const; + void char_at_put(int which, jchar contents); - jint int_at(int which) const { return *int_at_addr(which); } - void int_at_put(int which, jint contents) { *int_at_addr(which) = contents; } + jint int_at(int which) const; + void int_at_put(int which, jint contents); - jshort short_at(int which) const { return *short_at_addr(which); } - void short_at_put(int which, jshort contents) { *short_at_addr(which) = contents; } + jshort short_at(int which) const; + void short_at_put(int which, jshort contents); - jushort ushort_at(int which) const { return *ushort_at_addr(which); } - void ushort_at_put(int which, jushort contents) { *ushort_at_addr(which) = contents; } + jushort ushort_at(int which) const; + void ushort_at_put(int which, jushort contents); - jlong long_at(int which) const { return *long_at_addr(which); } - void long_at_put(int which, jlong contents) { *long_at_addr(which) = contents; } + jlong long_at(int which) const; + void long_at_put(int which, jlong contents); - jfloat float_at(int which) const { return *float_at_addr(which); } - void float_at_put(int which, jfloat contents) { *float_at_addr(which) = contents; } + jfloat float_at(int which) const; + void float_at_put(int which, jfloat contents); - jdouble double_at(int which) const { return *double_at_addr(which); } - void double_at_put(int which, jdouble contents) { *double_at_addr(which) = contents; } + jdouble double_at(int which) const; + void double_at_put(int which, jdouble 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); } + jbyte byte_at_acquire(int which) const; + void release_byte_at_put(int which, jbyte 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