< prev index next >
src/share/vm/oops/objArrayOop.inline.hpp
Print this page
*** 28,42 ****
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/globals.hpp"
inline oop objArrayOopDesc::obj_at(int index) const {
// With UseCompressedOops decode the narrow oop in the objArray to an
// uncompressed oop. Otherwise this is simply a "*" operator.
if (UseCompressedOops) {
! return load_decode_heap_oop(obj_at_addr<narrowOop>(index));
} else {
! return load_decode_heap_oop(obj_at_addr<oop>(index));
}
}
#endif // SHARE_VM_OOPS_OBJARRAYOOP_INLINE_HPP
--- 28,43 ----
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/globals.hpp"
inline oop objArrayOopDesc::obj_at(int index) const {
+ objArrayOop p = (objArrayOop) oopDesc::bs()->read_barrier((oop) this);
// With UseCompressedOops decode the narrow oop in the objArray to an
// uncompressed oop. Otherwise this is simply a "*" operator.
if (UseCompressedOops) {
! return load_decode_heap_oop(p->obj_at_addr<narrowOop>(index));
} else {
! return load_decode_heap_oop(p->obj_at_addr<oop>(index));
}
}
#endif // SHARE_VM_OOPS_OBJARRAYOOP_INLINE_HPP
< prev index next >