< prev index next > src/hotspot/share/cds/aotStreamedHeapLoader.cpp
Print this page
#include "memory/iterator.inline.hpp"
#include "memory/oopFactory.hpp"
#include "oops/access.inline.hpp"
#include "oops/objArrayOop.inline.hpp"
#include "oops/oop.inline.hpp"
+ #include "oops/oopCast.inline.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/mutex.hpp"
oop result;
{
MutexLocker ml(AOTHeapLoading_lock, Mutex::_safepoint_check_flag);
! oop root = objArrayOop(_roots.resolve())->obj_at(root_index);
if (root != nullptr) {
// The root has already been materialized
result = root;
} else {
oop result;
{
MutexLocker ml(AOTHeapLoading_lock, Mutex::_safepoint_check_flag);
! oop root = oop_cast<refArrayOop>(_roots.resolve())->obj_at(root_index);
if (root != nullptr) {
// The root has already been materialized
result = root;
} else {
return result;
}
oop AOTStreamedHeapLoader::get_root(int index) {
! oop result = objArrayOop(_roots.resolve())->obj_at(index);
if (result == nullptr) {
// Materialize root
result = materialize_root(index);
}
if (result == _roots.resolve()) {
return result;
}
oop AOTStreamedHeapLoader::get_root(int index) {
! oop result = oop_cast<refArrayOop>(_roots.resolve())->obj_at(index);
if (result == nullptr) {
// Materialize root
result = materialize_root(index);
}
if (result == _roots.resolve()) {
< prev index next >