25 #include "precompiled.hpp" 26 #include "classfile/javaClasses.hpp" 27 #include "classfile/systemDictionary.hpp" 28 #include "classfile/vmSymbols.hpp" 29 #include "gc/shared/collectedHeap.inline.hpp" 30 #include "gc/shared/gcLocker.hpp" 31 #include "jvmtifiles/jvmti.h" 32 #include "memory/universe.inline.hpp" 33 #include "oops/arrayKlass.hpp" 34 #include "oops/arrayOop.hpp" 35 #include "oops/instanceKlass.hpp" 36 #include "oops/objArrayOop.hpp" 37 #include "oops/oop.inline.hpp" 38 39 int ArrayKlass::static_size(int header_size) { 40 // size of an array klass object 41 assert(header_size <= InstanceKlass::header_size(), "bad header size"); 42 // If this assert fails, see comments in base_create_array_klass. 43 header_size = InstanceKlass::header_size(); 44 int vtable_len = Universe::base_vtable_size(); 45 #ifdef _LP64 46 int size = header_size + align_object_offset(vtable_len); 47 #else 48 int size = header_size + vtable_len; 49 #endif 50 return align_object_size(size); 51 } 52 53 54 Klass* ArrayKlass::java_super() const { 55 if (super() == NULL) return NULL; // bootstrap case 56 // Array klasses have primary supertypes which are not reported to Java. 57 // Example super chain: String[][] -> Object[][] -> Object[] -> Object 58 return SystemDictionary::Object_klass(); 59 } 60 61 62 oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) { 63 ShouldNotReachHere(); 64 return NULL; 65 } 66 67 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined 68 Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const { 69 // There are no fields in an array klass but look to the super class (Object) | 25 #include "precompiled.hpp" 26 #include "classfile/javaClasses.hpp" 27 #include "classfile/systemDictionary.hpp" 28 #include "classfile/vmSymbols.hpp" 29 #include "gc/shared/collectedHeap.inline.hpp" 30 #include "gc/shared/gcLocker.hpp" 31 #include "jvmtifiles/jvmti.h" 32 #include "memory/universe.inline.hpp" 33 #include "oops/arrayKlass.hpp" 34 #include "oops/arrayOop.hpp" 35 #include "oops/instanceKlass.hpp" 36 #include "oops/objArrayOop.hpp" 37 #include "oops/oop.inline.hpp" 38 39 int ArrayKlass::static_size(int header_size) { 40 // size of an array klass object 41 assert(header_size <= InstanceKlass::header_size(), "bad header size"); 42 // If this assert fails, see comments in base_create_array_klass. 43 header_size = InstanceKlass::header_size(); 44 int vtable_len = Universe::base_vtable_size(); 45 int size = header_size + vtable_len; 46 return align_object_size(size); 47 } 48 49 50 Klass* ArrayKlass::java_super() const { 51 if (super() == NULL) return NULL; // bootstrap case 52 // Array klasses have primary supertypes which are not reported to Java. 53 // Example super chain: String[][] -> Object[][] -> Object[] -> Object 54 return SystemDictionary::Object_klass(); 55 } 56 57 58 oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) { 59 ShouldNotReachHere(); 60 return NULL; 61 } 62 63 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined 64 Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const { 65 // There are no fields in an array klass but look to the super class (Object) |