mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8211279: Verify missing object equals barriers
Reviewed-by: pliden, shade, zgu
This commit is contained in:
parent
a9f9385ced
commit
3085a89f13
12 changed files with 33 additions and 15 deletions
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "gc/shared/barrierSet.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "gc/shared/collectedHeap.inline.hpp"
|
||||
#include "oops/oopsHierarchy.hpp"
|
||||
|
@ -53,4 +54,15 @@ void oop::unregister_oop() {
|
|||
t->unhandled_oops()->unregister_unhandled_oop(this);
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue