56 // Instance variables 57 int dimension() const { return _dimension; } 58 void set_dimension(int dimension) { _dimension = dimension; } 59 60 Klass* higher_dimension() const { return _higher_dimension; } 61 inline Klass* higher_dimension_acquire() const; // load with acquire semantics 62 void set_higher_dimension(Klass* k) { _higher_dimension = k; } 63 inline void release_set_higher_dimension(Klass* k); // store with release semantics 64 Klass** adr_higher_dimension() { return (Klass**)&this->_higher_dimension;} 65 66 Klass* lower_dimension() const { return _lower_dimension; } 67 void set_lower_dimension(Klass* k) { _lower_dimension = k; } 68 Klass** adr_lower_dimension() { return (Klass**)&this->_lower_dimension;} 69 70 // offset of first element, including any padding for the sake of alignment 71 int array_header_in_bytes() const { return layout_helper_header_size(layout_helper()); } 72 int log2_element_size() const { return layout_helper_log2_element_size(layout_helper()); } 73 // type of elements (T_OBJECT for both oop arrays and array-arrays) 74 BasicType element_type() const { return layout_helper_element_type(layout_helper()); } 75 76 virtual Klass* java_super() const;//{ return SystemDictionary::Object_klass(); } 77 78 // Allocation 79 // Sizes points to the first dimension of the array, subsequent dimensions 80 // are always in higher memory. The callers of these set that up. 81 virtual oop multi_allocate(int rank, jint* sizes, TRAPS); 82 objArrayOop allocate_arrayArray(int n, int length, TRAPS); 83 84 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined 85 Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const; 86 87 // Lookup operations 88 Method* uncached_lookup_method(const Symbol* name, 89 const Symbol* signature, 90 OverpassLookupMode overpass_mode, 91 PrivateLookupMode private_mode = find_private) const; 92 93 static ArrayKlass* cast(Klass* k) { 94 return const_cast<ArrayKlass*>(cast(const_cast<const Klass*>(k))); 95 } 96 97 static const ArrayKlass* cast(const Klass* k) { 98 assert(k->is_array_klass(), "cast to ArrayKlass"); 99 return static_cast<const ArrayKlass*>(k); 100 } 101 102 GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots, 103 Array<Klass*>* transitive_interfaces); 104 bool compute_is_subtype_of(Klass* k); 105 106 // Sizing 107 static int static_size(int header_size); 108 109 virtual void metaspace_pointers_do(MetaspaceClosure* iter); 110 111 #if INCLUDE_SERVICES 112 virtual void collect_statistics(KlassSizeStats *sz) const { 113 Klass::collect_statistics(sz); 114 // Do nothing for now, but remember to modify if you add new 115 // stuff to ArrayKlass. 116 } 117 #endif 118 119 // Iterators 120 void array_klasses_do(void f(Klass* k)); 121 void array_klasses_do(void f(Klass* k, TRAPS), TRAPS); 122 123 // Return a handle. | 56 // Instance variables 57 int dimension() const { return _dimension; } 58 void set_dimension(int dimension) { _dimension = dimension; } 59 60 Klass* higher_dimension() const { return _higher_dimension; } 61 inline Klass* higher_dimension_acquire() const; // load with acquire semantics 62 void set_higher_dimension(Klass* k) { _higher_dimension = k; } 63 inline void release_set_higher_dimension(Klass* k); // store with release semantics 64 Klass** adr_higher_dimension() { return (Klass**)&this->_higher_dimension;} 65 66 Klass* lower_dimension() const { return _lower_dimension; } 67 void set_lower_dimension(Klass* k) { _lower_dimension = k; } 68 Klass** adr_lower_dimension() { return (Klass**)&this->_lower_dimension;} 69 70 // offset of first element, including any padding for the sake of alignment 71 int array_header_in_bytes() const { return layout_helper_header_size(layout_helper()); } 72 int log2_element_size() const { return layout_helper_log2_element_size(layout_helper()); } 73 // type of elements (T_OBJECT for both oop arrays and array-arrays) 74 BasicType element_type() const { return layout_helper_element_type(layout_helper()); } 75 76 virtual InstanceKlass* java_super() const;//{ return SystemDictionary::Object_klass(); } 77 78 // Allocation 79 // Sizes points to the first dimension of the array, subsequent dimensions 80 // are always in higher memory. The callers of these set that up. 81 virtual oop multi_allocate(int rank, jint* sizes, TRAPS); 82 objArrayOop allocate_arrayArray(int n, int length, TRAPS); 83 84 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined 85 Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const; 86 87 // Lookup operations 88 Method* uncached_lookup_method(const Symbol* name, 89 const Symbol* signature, 90 OverpassLookupMode overpass_mode, 91 PrivateLookupMode private_mode = find_private) const; 92 93 static ArrayKlass* cast(Klass* k) { 94 return const_cast<ArrayKlass*>(cast(const_cast<const Klass*>(k))); 95 } 96 97 static const ArrayKlass* cast(const Klass* k) { 98 assert(k->is_array_klass(), "cast to ArrayKlass"); 99 return static_cast<const ArrayKlass*>(k); 100 } 101 102 GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots, 103 Array<InstanceKlass*>* transitive_interfaces); 104 bool compute_is_subtype_of(Klass* k); 105 106 // Sizing 107 static int static_size(int header_size); 108 109 virtual void metaspace_pointers_do(MetaspaceClosure* iter); 110 111 #if INCLUDE_SERVICES 112 virtual void collect_statistics(KlassSizeStats *sz) const { 113 Klass::collect_statistics(sz); 114 // Do nothing for now, but remember to modify if you add new 115 // stuff to ArrayKlass. 116 } 117 #endif 118 119 // Iterators 120 void array_klasses_do(void f(Klass* k)); 121 void array_klasses_do(void f(Klass* k, TRAPS), TRAPS); 122 123 // Return a handle. |