< prev index next >
src/share/vm/oops/oop.inline.hpp
Print this page
*** 531,543 ****
bool oopDesc::has_bias_pattern() const {
return mark()->has_bias_pattern();
}
! // used only for asserts
! bool oopDesc::is_oop(bool ignore_mark_word) const {
! oop obj = (oop) this;
if (!check_obj_alignment(obj)) return false;
if (!Universe::heap()->is_in_reserved(obj)) return false;
// obj is aligned and accessible in heap
if (Universe::heap()->is_in_reserved(obj->klass_or_null())) return false;
--- 531,542 ----
bool oopDesc::has_bias_pattern() const {
return mark()->has_bias_pattern();
}
! // used only for asserts and guarantees
! inline bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
if (!check_obj_alignment(obj)) return false;
if (!Universe::heap()->is_in_reserved(obj)) return false;
// obj is aligned and accessible in heap
if (Universe::heap()->is_in_reserved(obj->klass_or_null())) return false;
*** 546,565 ****
// Outside of a safepoint, the header could be changing (for example,
// another thread could be inflating a lock on this object).
if (ignore_mark_word) {
return true;
}
! if (mark() != NULL) {
return true;
}
return !SafepointSynchronize::is_at_safepoint();
}
!
! // used only for asserts
! bool oopDesc::is_oop_or_null(bool ignore_mark_word) const {
! return this == NULL ? true : is_oop(ignore_mark_word);
}
#ifndef PRODUCT
// used only for asserts
bool oopDesc::is_unlocked_oop() const {
--- 545,563 ----
// Outside of a safepoint, the header could be changing (for example,
// another thread could be inflating a lock on this object).
if (ignore_mark_word) {
return true;
}
! if (obj->mark() != NULL) {
return true;
}
return !SafepointSynchronize::is_at_safepoint();
}
! // used only for asserts and guarantees
! inline bool oopDesc::is_oop_or_null(oop obj, bool ignore_mark_word) {
! return obj == NULL ? true : is_oop(obj, ignore_mark_word);
}
#ifndef PRODUCT
// used only for asserts
bool oopDesc::is_unlocked_oop() const {
< prev index next >