8212992: Change mirror accessor in Klass::verify_on() to use AS_NO_KEEPALIVE
Reviewed-by: coleenp, pliden
This commit is contained in:
parent
8b1844626a
commit
dc260a5369
@ -59,6 +59,10 @@ oop Klass::java_mirror() const {
|
||||
return _java_mirror.resolve();
|
||||
}
|
||||
|
||||
oop Klass::java_mirror_no_keepalive() const {
|
||||
return _java_mirror.peek();
|
||||
}
|
||||
|
||||
bool Klass::is_cloneable() const {
|
||||
return _access_flags.is_cloneable_fast() ||
|
||||
is_subtype_of(SystemDictionary::Cloneable_klass());
|
||||
@ -746,8 +750,8 @@ void Klass::verify_on(outputStream* st) {
|
||||
}
|
||||
}
|
||||
|
||||
if (java_mirror() != NULL) {
|
||||
guarantee(oopDesc::is_oop(java_mirror()), "should be instance");
|
||||
if (java_mirror_no_keepalive() != NULL) {
|
||||
guarantee(oopDesc::is_oop(java_mirror_no_keepalive()), "should be instance");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,6 +257,7 @@ protected:
|
||||
|
||||
// java mirror
|
||||
oop java_mirror() const;
|
||||
oop java_mirror_no_keepalive() const;
|
||||
void set_java_mirror(Handle m);
|
||||
|
||||
oop archived_java_mirror_raw() NOT_CDS_JAVA_HEAP_RETURN_(NULL); // no GC barrier
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
OopHandle(oop* w) : _obj(w) {}
|
||||
|
||||
inline oop resolve() const;
|
||||
inline oop peek() const;
|
||||
|
||||
// Used only for removing handle.
|
||||
oop* ptr_raw() const { return _obj; }
|
||||
|
@ -32,5 +32,8 @@ inline oop OopHandle::resolve() const {
|
||||
return (_obj == NULL) ? (oop)NULL : NativeAccess<>::oop_load(_obj);
|
||||
}
|
||||
|
||||
#endif // SHARE_VM_OOPS_OOPHANDLE_INLINE_HPP
|
||||
inline oop OopHandle::peek() const {
|
||||
return (_obj == NULL) ? (oop)NULL : NativeAccess<AS_NO_KEEPALIVE>::oop_load(_obj);
|
||||
}
|
||||
|
||||
#endif // SHARE_VM_OOPS_OOPHANDLE_INLINE_HPP
|
||||
|
Loading…
x
Reference in New Issue
Block a user