# HG changeset patch # User pliden # Date 1568706662 -7200 # Node ID 272910ccd7bb5732e0ed872da1af9245028c8e7f # Parent d349347d6b5f1d4c1894d81b1a97193edc0004dd 8230796: Remove BarrierSet::oop_equals_operator_allowed() Reviewed-by: tschatzl, shade diff -r d349347d6b5f -r 272910ccd7bb src/hotspot/share/gc/shared/barrierSet.hpp --- a/src/hotspot/share/gc/shared/barrierSet.hpp Fri Sep 13 07:43:59 2019 +0200 +++ b/src/hotspot/share/gc/shared/barrierSet.hpp Tue Sep 17 09:51:02 2019 +0200 @@ -144,10 +144,6 @@ virtual void make_parsable(JavaThread* thread) {} -#ifdef CHECK_UNHANDLED_OOPS - virtual bool oop_equals_operator_allowed() { return true; } -#endif - public: // Print a description of the memory for the barrier set virtual void print_on(outputStream* st) const = 0; diff -r d349347d6b5f -r 272910ccd7bb src/hotspot/share/oops/oopsHierarchy.cpp --- a/src/hotspot/share/oops/oopsHierarchy.cpp Fri Sep 13 07:43:59 2019 +0200 +++ b/src/hotspot/share/oops/oopsHierarchy.cpp Tue Sep 17 09:51:02 2019 +0200 @@ -23,9 +23,6 @@ */ #include "precompiled.hpp" -#include "gc/shared/barrierSet.hpp" -#include "gc/shared/collectedHeap.hpp" -#include "gc/shared/collectedHeap.inline.hpp" #include "memory/universe.hpp" #include "oops/oopsHierarchy.hpp" #include "runtime/thread.inline.hpp" @@ -56,14 +53,4 @@ } } -bool oop::operator==(const oop o) const { - assert(BarrierSet::barrier_set()->oop_equals_operator_allowed(), "Not allowed"); - return obj() == o.obj(); -} - -bool oop::operator!=(const volatile oop o) const { - assert(BarrierSet::barrier_set()->oop_equals_operator_allowed(), "Not allowed"); - return obj() != o.obj(); -} - #endif // CHECK_UNHANDLED_OOPS diff -r d349347d6b5f -r 272910ccd7bb src/hotspot/share/oops/oopsHierarchy.hpp --- a/src/hotspot/share/oops/oopsHierarchy.hpp Fri Sep 13 07:43:59 2019 +0200 +++ b/src/hotspot/share/oops/oopsHierarchy.hpp Tue Sep 17 09:51:02 2019 +0200 @@ -100,9 +100,9 @@ // General access oopDesc* operator->() const { return obj(); } - bool operator==(const oop o) const; + bool operator==(const oop o) const { return obj() == o.obj(); } bool operator==(void *p) const { return obj() == p; } - bool operator!=(const volatile oop o) const; + bool operator!=(const volatile oop o) const { return obj() != o.obj(); } bool operator!=(void *p) const { return obj() != p; } // Assignment