diff -r 13588c901957 -r 9cf78a70fa4f src/hotspot/share/oops/oopsHierarchy.hpp --- a/src/hotspot/share/oops/oopsHierarchy.hpp Thu Oct 17 20:27:44 2019 +0100 +++ b/src/hotspot/share/oops/oopsHierarchy.hpp Thu Oct 17 20:53:35 2019 +0100 @@ -39,15 +39,14 @@ typedef juint narrowKlass; typedef void* OopOrNarrowOopStar; -typedef class markOopDesc* markOop; #ifndef CHECK_UNHANDLED_OOPS -typedef class oopDesc* oop; +typedef class oopDesc* oop; typedef class instanceOopDesc* instanceOop; -typedef class arrayOopDesc* arrayOop; +typedef class arrayOopDesc* arrayOop; typedef class objArrayOopDesc* objArrayOop; -typedef class typeArrayOopDesc* typeArrayOop; +typedef class typeArrayOopDesc* typeArrayOop; #else @@ -74,7 +73,7 @@ class PromotedObject; class oopDesc; -extern bool CheckUnhandledOops; +extern "C" bool CheckUnhandledOops; class oop { oopDesc* _o; @@ -82,7 +81,6 @@ void register_oop(); void unregister_oop(); - // friend class markOop; public: void set_obj(const void* p) { raw_set_obj(p); @@ -102,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 @@ -121,7 +119,6 @@ operator oopDesc* () const volatile { return obj(); } operator intptr_t* () const { return (intptr_t*)obj(); } operator PromotedObject* () const { return (PromotedObject*)obj(); } - operator markOop () const volatile { return markOop(obj()); } operator address () const { return (address)obj(); } // from javaCalls.cpp @@ -193,10 +190,6 @@ return (T)(CHECK_UNHANDLED_OOPS_ONLY((void*))o); } -inline bool check_obj_alignment(oop obj) { - return (cast_from_oop(obj) & MinObjAlignmentInBytesMask) == 0; -} - // The metadata hierarchy is separate from the oop hierarchy // class MetaspaceObj