< prev index next >

src/hotspot/share/gc/z/zBarrier.inline.hpp

Print this page

        

@@ -35,11 +35,11 @@
   uintptr_t addr = ZOop::to_address(o);
 
 retry:
   // Fast path
   if (fast_path(addr)) {
-    return ZOop::from_address(addr);
+    return ZOop::to_oop(addr);
   }
 
   // Slow path
   const uintptr_t good_addr = slow_path(addr);
 

@@ -54,22 +54,22 @@
       addr = prev_addr;
       goto retry;
     }
   }
 
-  return ZOop::from_address(good_addr);
+  return ZOop::to_oop(good_addr);
 }
 
 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path>
 inline oop ZBarrier::weak_barrier(volatile oop* p, oop o) {
   const uintptr_t addr = ZOop::to_address(o);
 
   // Fast path
   if (fast_path(addr)) {
     // Return the good address instead of the weak good address
     // to ensure that the currently active heap view is used.
-    return ZOop::from_address(ZAddress::good_or_null(addr));
+    return ZOop::to_oop(ZAddress::good_or_null(addr));
   }
 
   // Slow path
   uintptr_t good_addr = slow_path(addr);
 

@@ -93,11 +93,11 @@
       // to ensure that the currently active heap view is used.
       good_addr = ZAddress::good_or_null(prev_addr);
     }
   }
 
-  return ZOop::from_address(good_addr);
+  return ZOop::to_oop(good_addr);
 }
 
 template <ZBarrierFastPath fast_path, ZBarrierSlowPath slow_path>
 inline void ZBarrier::root_barrier(oop* p, oop o) {
   const uintptr_t addr = ZOop::to_address(o);

@@ -115,11 +115,11 @@
   // which ensures we are never racing with mutators modifying roots while
   // we are healing them. It's also safe in case multiple GC threads try
   // to heal the same root if it is aligned, since they would always heal
   // the root in the same way and it does not matter in which order it
   // happens. For misaligned oops, there needs to be mutual exclusion.
-  *p = ZOop::from_address(good_addr);
+  *p = ZOop::to_oop(good_addr);
 }
 
 inline bool ZBarrier::is_null_fast_path(uintptr_t addr) {
   return ZAddress::is_null(addr);
 }
< prev index next >