73 OverpassLookupMode overpass_mode) const {
74 // There are no methods in an array klass but the super class (Object) has some
75 assert(super(), "super klass must be present");
76 // Always ignore overpass methods in superclasses, although technically the
77 // super klass of an array, (j.l.Object) should not have
78 // any overpass methods present.
79 return super()->uncached_lookup_method(name, signature, Klass::skip_overpass);
80 }
81
82 ArrayKlass::ArrayKlass(Symbol* name) :
83 _dimension(1),
84 _higher_dimension(NULL),
85 _lower_dimension(NULL) {
86 // Arrays don't add any new methods, so their vtable is the same size as
87 // the vtable of klass Object.
88 set_vtable_length(Universe::base_vtable_size());
89 set_name(name);
90 set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
91 set_layout_helper(Klass::_lh_neutral_value);
92 set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
93 TRACE_INIT_KLASS_ID(this);
94 }
95
96
97 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
98 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
99 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, KlassHandle super_klass, ModuleEntry* module_entry, TRAPS) {
100 ResourceMark rm(THREAD);
101 k->initialize_supers(super_klass(), CHECK);
102 k->vtable()->initialize_vtable(false, CHECK);
103
104 // During bootstrapping, before java.base is defined, the module_entry may not be present yet.
105 // These classes will be put on a fixup list and their module fields will be patched once
106 // java.base is defined.
107 assert((module_entry != NULL) || ((module_entry == NULL) && !ModuleEntryTable::javabase_defined()),
108 "module entry not available post java.base definition");
109 oop module = (module_entry != NULL) ? JNIHandles::resolve(module_entry->module()) : (oop)NULL;
110 java_lang_Class::create_mirror(k, Handle(THREAD, k->class_loader()), Handle(THREAD, module), Handle(NULL), CHECK);
111 }
112
113 GrowableArray<Klass*>* ArrayKlass::compute_secondary_supers(int num_extra_slots) {
|
73 OverpassLookupMode overpass_mode) const {
74 // There are no methods in an array klass but the super class (Object) has some
75 assert(super(), "super klass must be present");
76 // Always ignore overpass methods in superclasses, although technically the
77 // super klass of an array, (j.l.Object) should not have
78 // any overpass methods present.
79 return super()->uncached_lookup_method(name, signature, Klass::skip_overpass);
80 }
81
82 ArrayKlass::ArrayKlass(Symbol* name) :
83 _dimension(1),
84 _higher_dimension(NULL),
85 _lower_dimension(NULL) {
86 // Arrays don't add any new methods, so their vtable is the same size as
87 // the vtable of klass Object.
88 set_vtable_length(Universe::base_vtable_size());
89 set_name(name);
90 set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
91 set_layout_helper(Klass::_lh_neutral_value);
92 set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
93 TRACE_INIT_ID(this);
94 }
95
96
97 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
98 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
99 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, KlassHandle super_klass, ModuleEntry* module_entry, TRAPS) {
100 ResourceMark rm(THREAD);
101 k->initialize_supers(super_klass(), CHECK);
102 k->vtable()->initialize_vtable(false, CHECK);
103
104 // During bootstrapping, before java.base is defined, the module_entry may not be present yet.
105 // These classes will be put on a fixup list and their module fields will be patched once
106 // java.base is defined.
107 assert((module_entry != NULL) || ((module_entry == NULL) && !ModuleEntryTable::javabase_defined()),
108 "module entry not available post java.base definition");
109 oop module = (module_entry != NULL) ? JNIHandles::resolve(module_entry->module()) : (oop)NULL;
110 java_lang_Class::create_mirror(k, Handle(THREAD, k->class_loader()), Handle(THREAD, module), Handle(NULL), CHECK);
111 }
112
113 GrowableArray<Klass*>* ArrayKlass::compute_secondary_supers(int num_extra_slots) {
|