< prev index next >

src/hotspot/share/memory/oopFactory.hpp

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 1997, 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.

@@ -24,14 +24,17 @@
  
  #ifndef SHARE_MEMORY_OOPFACTORY_HPP
  #define SHARE_MEMORY_OOPFACTORY_HPP
  
  #include "memory/referenceType.hpp"
+ #include "oops/arrayKlass.hpp"
  #include "oops/oopsHierarchy.hpp"
  #include "runtime/handles.hpp"
  #include "utilities/exceptions.hpp"
  
+ class InlineKlass;
+ 
  // oopFactory is a class used for creating new objects.
  
  class oopFactory: AllStatic {
   public:
    // Basic type leaf array allocation

@@ -43,21 +46,29 @@
    static typeArrayOop    new_shortArray (int length, TRAPS);
    static typeArrayOop    new_intArray   (int length, TRAPS);
    static typeArrayOop    new_longArray  (int length, TRAPS);
  
    // create java.lang.Object[]
-   static objArrayOop     new_objectArray(int length, TRAPS);
+   static refArrayOop     new_objectArray(int length, TRAPS);
  
    static typeArrayOop    new_charArray(const char* utf8_str,  TRAPS);
  
    static typeArrayOop    new_typeArray(BasicType type, int length, TRAPS);
    static typeArrayOop    new_typeArray_nozero(BasicType type, int length, TRAPS);
    static typeArrayOop    new_symbolArray(int length, TRAPS);
  
    // Regular object arrays
    static objArrayOop     new_objArray(Klass* klass, int length, TRAPS);
+   static objArrayOop     new_objArray(Klass* klass, int length, ArrayProperties properties, TRAPS);
+ 
+   // Factories to create a reference arrays
+   static refArrayOop     new_refArray(Klass* klass, int length, TRAPS);
+   static refArrayOop     new_refArray(Klass* klass, int length, ArrayProperties properties, TRAPS);
+ 
+   // Factory to create flat arrays.
+   static flatArrayOop    new_flatArray(InlineKlass* klass, int length, ArrayProperties props, TRAPS);
  
    // Helper that returns a Handle
-   static objArrayHandle  new_objArray_handle(Klass* klass, int length, TRAPS);
+   static refArrayHandle  new_refArray_handle(Klass* klass, int length, TRAPS);
  };
  
  #endif // SHARE_MEMORY_OOPFACTORY_HPP
< prev index next >