< prev index next >

src/hotspot/share/ci/ciEnv.cpp

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -61,10 +61,11 @@
  #include "oops/method.inline.hpp"
  #include "oops/methodData.hpp"
  #include "oops/objArrayKlass.hpp"
  #include "oops/objArrayOop.inline.hpp"
  #include "oops/oop.inline.hpp"
+ #include "oops/oopCast.inline.hpp"
  #include "oops/resolvedIndyEntry.hpp"
  #include "oops/symbolHandle.hpp"
  #include "prims/jvmtiExport.hpp"
  #include "prims/methodHandles.hpp"
  #include "runtime/fieldDescriptor.inline.hpp"

@@ -487,11 +488,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.

@@ -1356,11 +1357,13 @@
      RecordLocation fp0(this, "vmentry");
      record_member(thread, member);
    }
  
    // Check LambdaForm.names array
-   objArrayOop names = (objArrayOop)obj_field(form, "names");
+   // The type of the array is Name[] and Name is an identity class,
+   // so the array is always an array of references
+   refArrayOop names = oop_cast<refArrayOop>(obj_field(form, "names"));
    if (names != nullptr) {
      RecordLocation lp0(this, "names");
      int len = names->length();
      for (int i = 0; i < len; ++i) {
        oop name = names->obj_at(i);
< prev index next >