src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp
changeset 49592 77fb0be7d19f
parent 49337 e4fdca451542
child 49722 a47d1e21b3f1
--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp	Fri Mar 23 12:55:39 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp	Thu Mar 15 21:24:10 2018 +0100
@@ -27,12 +27,12 @@
 
 #include "gc/g1/g1ParScanThreadState.hpp"
 #include "gc/g1/g1RemSet.hpp"
+#include "oops/access.inline.hpp"
 #include "oops/oop.inline.hpp"
 
 template <class T> void G1ParScanThreadState::do_oop_evac(T* p, HeapRegion* from) {
-  assert(!oopDesc::is_null(oopDesc::load_decode_heap_oop(p)),
-         "Reference should not be NULL here as such are never pushed to the task queue.");
-  oop obj = oopDesc::load_decode_heap_oop_not_null(p);
+  // Reference should not be NULL here as such are never pushed to the task queue.
+  oop obj = RawAccess<OOP_NOT_NULL>::oop_load(p);
 
   // Although we never intentionally push references outside of the collection
   // set, due to (benign) races in the claim mechanism during RSet scanning more
@@ -46,7 +46,7 @@
     } else {
       obj = copy_to_survivor_space(in_cset_state, obj, m);
     }
-    oopDesc::encode_store_heap_oop(p, obj);
+    RawAccess<>::oop_store(p, obj);
   } else if (in_cset_state.is_humongous()) {
     _g1h->set_humongous_is_live(obj);
   } else {
@@ -146,4 +146,3 @@
 }
 
 #endif // SHARE_VM_GC_G1_G1PARSCANTHREADSTATE_INLINE_HPP
-