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 Method* ArrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const {
68 // There are no methods in an array klass but the super class (Object) has some
69 assert(super(), "super klass must be present");
70 return super()->uncached_lookup_method(name, signature, mode);
71 }
72
73 ArrayKlass::ArrayKlass(Symbol* name) {
74 set_name(name);
75
76 set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
77 set_layout_helper(Klass::_lh_neutral_value);
78 set_dimension(1);
79 set_higher_dimension(NULL);
80 set_lower_dimension(NULL);
81 set_component_mirror(NULL);
82 // Arrays don't add any new methods, so their vtable is the same size as
83 // the vtable of klass Object.
84 int vtable_size = Universe::base_vtable_size();
85 set_vtable_length(vtable_size);
86 set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
87 }
88
89
90 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
91 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
92 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, KlassHandle super_klass, TRAPS) {
93 ResourceMark rm(THREAD);
|
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 Method* ArrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature, MethodLookupMode mode) const {
68 // There are no methods in an array klass but the super class (Object) has some
69 assert(super(), "super klass must be present");
70 return super()->uncached_lookup_method(name, signature, mode);
71 }
72
73 ArrayKlass::ArrayKlass(Symbol* name, DispatchTag tag) : Klass(tag) {
74 set_name(name);
75
76 set_super(Universe::is_bootstrapping() ? (Klass*)NULL : SystemDictionary::Object_klass());
77 set_layout_helper(Klass::_lh_neutral_value);
78 set_dimension(1);
79 set_higher_dimension(NULL);
80 set_lower_dimension(NULL);
81 set_component_mirror(NULL);
82 // Arrays don't add any new methods, so their vtable is the same size as
83 // the vtable of klass Object.
84 int vtable_size = Universe::base_vtable_size();
85 set_vtable_length(vtable_size);
86 set_is_cloneable(); // All arrays are considered to be cloneable (See JLS 20.1.5)
87 }
88
89
90 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
91 // since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
92 void ArrayKlass::complete_create_array_klass(ArrayKlass* k, KlassHandle super_klass, TRAPS) {
93 ResourceMark rm(THREAD);
|