< prev index next >

src/hotspot/share/oops/oopsHierarchy.hpp

Print this page

        

@@ -99,13 +99,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_SHENANDOAHGC
+    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_SHENANDOAHGC
+    if (ShenandoahVerifyObjectEquals) {
+      ShouldNotReachHere();
+    }
+#endif
+    return obj() != o.obj();
+  }
   bool operator!=(void *p) const      { return obj() != p; }
 
   // Assignment
   oop& operator=(const oop& o)                            { _o = o.obj(); return *this; }
   volatile oop& operator=(const oop& o) volatile          { _o = o.obj(); return *this; }
< prev index next >