equal
deleted
inserted
replaced
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
|
26 #include "classfile/moduleEntry.hpp" |
|
27 #include "classfile/packageEntry.hpp" |
26 #include "classfile/symbolTable.hpp" |
28 #include "classfile/symbolTable.hpp" |
27 #include "classfile/systemDictionary.hpp" |
29 #include "classfile/systemDictionary.hpp" |
28 #include "classfile/vmSymbols.hpp" |
30 #include "classfile/vmSymbols.hpp" |
29 #include "gc/shared/collectedHeap.inline.hpp" |
31 #include "gc/shared/collectedHeap.inline.hpp" |
30 #include "gc/shared/specialized_oop_closures.hpp" |
32 #include "gc/shared/specialized_oop_closures.hpp" |
133 // Add all classes to our internal class loader list here, |
135 // Add all classes to our internal class loader list here, |
134 // including classes in the bootstrap (NULL) class loader. |
136 // including classes in the bootstrap (NULL) class loader. |
135 // GC walks these as strong roots. |
137 // GC walks these as strong roots. |
136 loader_data->add_class(oak); |
138 loader_data->add_class(oak); |
137 |
139 |
138 // The array is defined in the module of its bottom class |
140 ModuleEntry* module = oak->module(); |
139 Klass* bottom_klass = oak->bottom_klass(); |
|
140 ModuleEntry* module; |
|
141 if (bottom_klass->is_instance_klass()) { |
|
142 module = InstanceKlass::cast(bottom_klass)->module(); |
|
143 } else { |
|
144 module = ModuleEntryTable::javabase_module(); |
|
145 } |
|
146 assert(module != NULL, "No module entry for array"); |
141 assert(module != NULL, "No module entry for array"); |
147 |
142 |
148 // Call complete_create_array_klass after all instance variables has been initialized. |
143 // Call complete_create_array_klass after all instance variables has been initialized. |
149 ArrayKlass::complete_create_array_klass(oak, super_klass, module, CHECK_0); |
144 ArrayKlass::complete_create_array_klass(oak, super_klass, module, CHECK_0); |
150 |
145 |
420 |
415 |
421 return (element_flags & (JVM_ACC_PUBLIC | JVM_ACC_PRIVATE | JVM_ACC_PROTECTED)) |
416 return (element_flags & (JVM_ACC_PUBLIC | JVM_ACC_PRIVATE | JVM_ACC_PROTECTED)) |
422 | (JVM_ACC_ABSTRACT | JVM_ACC_FINAL); |
417 | (JVM_ACC_ABSTRACT | JVM_ACC_FINAL); |
423 } |
418 } |
424 |
419 |
|
420 ModuleEntry* ObjArrayKlass::module() const { |
|
421 assert(bottom_klass() != NULL, "ObjArrayKlass returned unexpected NULL bottom_klass"); |
|
422 // The array is defined in the module of its bottom class |
|
423 return bottom_klass()->module(); |
|
424 } |
|
425 |
|
426 PackageEntry* ObjArrayKlass::package() const { |
|
427 assert(bottom_klass() != NULL, "ObjArrayKlass returned unexpected NULL bottom_klass"); |
|
428 return bottom_klass()->package(); |
|
429 } |
425 |
430 |
426 // Printing |
431 // Printing |
427 |
432 |
428 void ObjArrayKlass::print_on(outputStream* st) const { |
433 void ObjArrayKlass::print_on(outputStream* st) const { |
429 #ifndef PRODUCT |
434 #ifndef PRODUCT |