< prev index next >

src/hotspot/share/gc/serial/markSweep.inline.hpp

Print this page
@@ -25,10 +25,11 @@
  #ifndef SHARE_GC_SERIAL_MARKSWEEP_INLINE_HPP
  #define SHARE_GC_SERIAL_MARKSWEEP_INLINE_HPP
  
  #include "gc/serial/markSweep.hpp"
  
+ #include "gc/shared/gcForwarding.inline.hpp"
  #include "classfile/classLoaderData.inline.hpp"
  #include "classfile/javaClasses.inline.hpp"
  #include "gc/shared/continuationGCSupport.inline.hpp"
  #include "gc/serial/serialStringDedup.hpp"
  #include "memory/universe.hpp"

@@ -43,12 +44,12 @@
    T heap_oop = RawAccess<>::oop_load(p);
    if (!CompressedOops::is_null(heap_oop)) {
      oop obj = CompressedOops::decode_not_null(heap_oop);
      assert(Universe::heap()->is_in(obj), "should be in heap");
  
-     if (obj->is_forwarded()) {
-       oop new_obj = obj->forwardee();
+     if (GCForwarding::is_forwarded(obj)) {
+       oop new_obj = GCForwarding::forwardee(obj);
        assert(is_object_aligned(new_obj), "oop must be aligned");
        RawAccess<IS_NOT_NULL>::oop_store(p, new_obj);
      }
    }
  }
< prev index next >