< prev index next >

src/hotspot/share/ci/ciEnv.cpp

Print this page
@@ -24,10 +24,11 @@
  
  #include "precompiled.hpp"
  #include "ci/ciConstant.hpp"
  #include "ci/ciEnv.hpp"
  #include "ci/ciField.hpp"
+ #include "ci/ciInlineKlass.hpp"
  #include "ci/ciInstance.hpp"
  #include "ci/ciInstanceKlass.hpp"
  #include "ci/ciMethod.hpp"
  #include "ci/ciNullObject.hpp"
  #include "ci/ciReplay.hpp"

@@ -525,11 +526,12 @@
    // In either case, if we can find the element type in the system dictionary,
    // we must build an array type around it.  The CI requires array klasses
    // to be loaded if their element klasses are loaded, except when memory
    // is exhausted.
    if (Signature::is_array(sym) &&
-       (sym->char_at(1) == JVM_SIGNATURE_ARRAY || sym->char_at(1) == JVM_SIGNATURE_CLASS)) {
+       (sym->char_at(1) == JVM_SIGNATURE_ARRAY ||
+        sym->char_at(1) == JVM_SIGNATURE_CLASS )) {
      // We have an unloaded array.
      // Build it on the fly if the element class exists.
      SignatureStream ss(sym, false);
      ss.skip_array_prefix(1);
      // Get element ciKlass recursively.

@@ -538,11 +540,11 @@
                               cpool,
                               get_symbol(ss.as_symbol()),
                               require_local);
      if (elem_klass != nullptr && elem_klass->is_loaded()) {
        // Now make an array for it
-       return ciObjArrayKlass::make_impl(elem_klass);
+       return ciArrayKlass::make(elem_klass);
      }
    }
  
    if (found_klass == nullptr && !cpool.is_null() && cpool->has_preresolution()) {
      // Look inside the constant pool for pre-resolved class entries.

@@ -564,10 +566,14 @@
  
    if (require_local)  return nullptr;
  
    // Not yet loaded into the VM, or not governed by loader constraints.
    // Make a CI representative for it.
+   int i = 0;
+   while (sym->char_at(i) == JVM_SIGNATURE_ARRAY) {
+     i++;
+   }
    return get_unloaded_klass(accessing_klass, name);
  }
  
  // ------------------------------------------------------------------
  // ciEnv::get_klass_by_name
< prev index next >