< prev index next >

src/share/vm/oops/oopsHierarchy.hpp

Print this page

        

@@ -25,10 +25,13 @@
 #ifndef SHARE_VM_OOPS_OOPSHIERARCHY_HPP
 #define SHARE_VM_OOPS_OOPSHIERARCHY_HPP
 
 #include "runtime/globals.hpp"
 #include "utilities/globalDefinitions.hpp"
+#if INCLUDE_ALL_GCS
+#include "gc_implementation/shenandoah/shenandoah_globals.hpp"
+#endif
 
 // OBJECT hierarchy
 // This hierarchy is a representation hierarchy, i.e. if A is a superclass
 // of B, A's representation is a prefix of B's representation.
 

@@ -97,13 +100,27 @@
 
   oopDesc* obj()  const volatile      { return _o; }
 
   // General access
   oopDesc*  operator->() const        { return obj(); }
-  bool operator==(const oop o) const  { return obj() == o.obj(); }
+  bool operator==(const oop o) const  {
+#if INCLUDE_ALL_GCS
+    if (ShenandoahVerifyObjectEquals) {
+      ShouldNotReachHere();
+    }
+#endif
+    return obj() == o.obj();
+  }
   bool operator==(void *p) const      { return obj() == p; }
-  bool operator!=(const volatile oop o) const  { return obj() != o.obj(); }
+  bool operator!=(const volatile oop o) const  {
+#if INCLUDE_ALL_GCS
+    if (ShenandoahVerifyObjectEquals) {
+      ShouldNotReachHere();
+    }
+#endif
+    return obj() != o.obj();
+  }
   bool operator!=(void *p) const      { return obj() != p; }
 
   bool operator<(oop o) const         { return obj() < o.obj(); }
   bool operator>(oop o) const         { return obj() > o.obj(); }
   bool operator<=(oop o) const        { return obj() <= o.obj(); }
< prev index next >