54 // Array klasses have primary supertypes which are not reported to Java.
55 // Example super chain: String[][] -> Object[][] -> Object[] -> Object
56 return SystemDictionary::Object_klass();
57 }
58
59
60 oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
61 ShouldNotReachHere();
62 return NULL;
63 }
64
65 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
66 Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
67 // There are no fields in an array klass but look to the super class (Object)
68 assert(super(), "super klass must be present");
69 return super()->find_field(name, sig, fd);
70 }
71
72 Method* ArrayKlass::uncached_lookup_method(const Symbol* name,
73 const Symbol* signature,
74 OverpassLookupMode overpass_mode) const {
75 // There are no methods in an array klass but the super class (Object) has some
76 assert(super(), "super klass must be present");
77 // Always ignore overpass methods in superclasses, although technically the
78 // super klass of an array, (j.l.Object) should not have
79 // any overpass methods present.
80 return super()->uncached_lookup_method(name, signature, Klass::skip_overpass);
81 }
82
83 ArrayKlass::ArrayKlass(Symbol* name) :
84 _dimension(1),
85 _higher_dimension(NULL),
86 _lower_dimension(NULL) {
87 // Arrays don't add any new methods, so their vtable is the same size as
88 // the vtable of klass Object.
89 set_vtable_length(Universe::base_vtable_size());
90 set_name(name);
91 set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
92 set_layout_helper(Klass::_lh_neutral_value);
93 set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
94 JFR_ONLY(INIT_ID(this);)
95 }
96
97
98 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
99 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
100 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, Klass* super_klass, ModuleEntry* module_entry, TRAPS) {
|
54 // Array klasses have primary supertypes which are not reported to Java.
55 // Example super chain: String[][] -> Object[][] -> Object[] -> Object
56 return SystemDictionary::Object_klass();
57 }
58
59
60 oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
61 ShouldNotReachHere();
62 return NULL;
63 }
64
65 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
66 Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
67 // There are no fields in an array klass but look to the super class (Object)
68 assert(super(), "super klass must be present");
69 return super()->find_field(name, sig, fd);
70 }
71
72 Method* ArrayKlass::uncached_lookup_method(const Symbol* name,
73 const Symbol* signature,
74 OverpassLookupMode overpass_mode,
75 PrivateLookupMode private_mode) const {
76 // There are no methods in an array klass but the super class (Object) has some
77 assert(super(), "super klass must be present");
78 // Always ignore overpass methods in superclasses, although technically the
79 // super klass of an array, (j.l.Object) should not have
80 // any overpass methods present.
81 return super()->uncached_lookup_method(name, signature, Klass::skip_overpass, private_mode);
82 }
83
84 ArrayKlass::ArrayKlass(Symbol* name) :
85 _dimension(1),
86 _higher_dimension(NULL),
87 _lower_dimension(NULL) {
88 // Arrays don't add any new methods, so their vtable is the same size as
89 // the vtable of klass Object.
90 set_vtable_length(Universe::base_vtable_size());
91 set_name(name);
92 set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
93 set_layout_helper(Klass::_lh_neutral_value);
94 set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
95 JFR_ONLY(INIT_ID(this);)
96 }
97
98
99 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
100 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
101 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, Klass* super_klass, ModuleEntry* module_entry, TRAPS) {
|