diff -r 55c43e677ded -r fb0275c320a0 src/hotspot/share/oops/oop.cpp --- a/src/hotspot/share/oops/oop.cpp Mon Nov 20 12:04:13 2017 +0100 +++ b/src/hotspot/share/oops/oop.cpp Mon Nov 20 13:07:44 2017 +0100 @@ -37,8 +37,6 @@ bool always_do_update_barrier = false; -BarrierSet* oopDesc::_bs = NULL; - void oopDesc::print_on(outputStream* st) const { if (this == NULL) { st->print_cr("NULL"); @@ -175,6 +173,48 @@ return UseCompressedClassPointers; } +oop oopDesc::obj_field_acquire(int offset) const { return HeapAccess::oop_load_at(as_oop(), offset); } + +void oopDesc::obj_field_put_raw(int offset, oop value) { RawAccess<>::oop_store_at(as_oop(), offset, value); } +void oopDesc::release_obj_field_put(int offset, oop value) { HeapAccess::oop_store_at(as_oop(), offset, value); } +void oopDesc::obj_field_put_volatile(int offset, oop value) { HeapAccess::oop_store_at(as_oop(), offset, value); } + +address oopDesc::address_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); } +address oopDesc::address_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } + +void oopDesc::address_field_put(int offset, address value) { HeapAccess<>::store_at(as_oop(), offset, value); } +void oopDesc::release_address_field_put(int offset, address value) { HeapAccess::store_at(as_oop(), offset, value); } + +Metadata* oopDesc::metadata_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); } +void oopDesc::metadata_field_put(int offset, Metadata* value) { HeapAccess<>::store_at(as_oop(), offset, value); } + +Metadata* oopDesc::metadata_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_metadata_field_put(int offset, Metadata* value) { HeapAccess::store_at(as_oop(), offset, value); } + +jbyte oopDesc::byte_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_byte_field_put(int offset, jbyte value) { HeapAccess::store_at(as_oop(), offset, value); } + +jchar oopDesc::char_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_char_field_put(int offset, jchar value) { HeapAccess::store_at(as_oop(), offset, value); } + +jboolean oopDesc::bool_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_bool_field_put(int offset, jboolean value) { HeapAccess::store_at(as_oop(), offset, jboolean(value & 1)); } + +jint oopDesc::int_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_int_field_put(int offset, jint value) { HeapAccess::store_at(as_oop(), offset, value); } + +jshort oopDesc::short_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_short_field_put(int offset, jshort value) { HeapAccess::store_at(as_oop(), offset, value); } + +jlong oopDesc::long_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_long_field_put(int offset, jlong value) { HeapAccess::store_at(as_oop(), offset, value); } + +jfloat oopDesc::float_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_float_field_put(int offset, jfloat value) { HeapAccess::store_at(as_oop(), offset, value); } + +jdouble oopDesc::double_field_acquire(int offset) const { return HeapAccess::load_at(as_oop(), offset); } +void oopDesc::release_double_field_put(int offset, jdouble value) { HeapAccess::store_at(as_oop(), offset, value); } + #if INCLUDE_CDS_JAVA_HEAP bool oopDesc::is_archive_object(oop p) { return (p == NULL) ? false : G1ArchiveAllocator::is_archive_object(p);