< prev index next >

src/hotspot/share/cds/aotStreamedHeapLoader.cpp

Print this page
*** 39,10 ***
--- 39,11 ---
  #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"

*** 1049,11 ***
  
    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 {
--- 1050,11 ---
  
    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 {

*** 1068,11 ***
  
    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()) {
--- 1069,11 ---
  
    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 >