< prev index next >

src/hotspot/share/oops/instanceKlass.cpp

Print this page

        

@@ -1396,11 +1396,12 @@
     THROW_MSG(throwError ? vmSymbols::java_lang_IllegalAccessError()
               : vmSymbols::java_lang_IllegalAccessException(), external_name());
   }
 }
 
-Klass* InstanceKlass::array_klass_impl(bool or_null, int n, TRAPS) {
+Klass* InstanceKlass::array_klass_impl(ArrayStorageProperties storage_props, bool or_null, int n, TRAPS) {
+  assert(!storage_props.is_flattened(), "Can't be flattened");
   // Need load-acquire for lock-free read
   if (array_klasses_acquire() == NULL) {
     if (or_null) return NULL;
 
     ResourceMark rm;

@@ -1409,26 +1410,26 @@
       // Atomic creation of array_klasses
       MutexLocker ma(MultiArray_lock, THREAD);
 
       // Check if update has already taken place
       if (array_klasses() == NULL) {
-        Klass*    k = ObjArrayKlass::allocate_objArray_klass(class_loader_data(), 1, this, CHECK_NULL);
+        Klass*    k = ObjArrayKlass::allocate_objArray_klass(storage_props, 1, this, CHECK_NULL);
         // use 'release' to pair with lock-free load
         release_set_array_klasses(k);
       }
     }
   }
   // _this will always be set at this point
   ObjArrayKlass* oak = (ObjArrayKlass*)array_klasses();
   if (or_null) {
-    return oak->array_klass_or_null(n);
+    return oak->array_klass_or_null(storage_props, n);
   }
-  return oak->array_klass(n, THREAD);
+  return oak->array_klass(storage_props, n, THREAD);
 }
 
-Klass* InstanceKlass::array_klass_impl(bool or_null, TRAPS) {
-  return array_klass_impl(or_null, 1, THREAD);
+Klass* InstanceKlass::array_klass_impl(ArrayStorageProperties storage_props, bool or_null, TRAPS) {
+  return array_klass_impl(storage_props, or_null, 1, THREAD);
 }
 
 static int call_class_initializer_counter = 0;   // for debugging
 
 Method* InstanceKlass::class_initializer() const {

@@ -1649,15 +1650,10 @@
   }
   FREE_C_HEAP_ARRAY(int, fields_sorted);
 }
 
 
-void InstanceKlass::array_klasses_do(void f(Klass* k, TRAPS), TRAPS) {
-  if (array_klasses() != NULL)
-    ArrayKlass::cast(array_klasses())->array_klasses_do(f, THREAD);
-}
-
 void InstanceKlass::array_klasses_do(void f(Klass* k)) {
   if (array_klasses() != NULL)
     ArrayKlass::cast(array_klasses())->array_klasses_do(f);
 }
 
< prev index next >