< prev index next >

src/hotspot/share/oops/objArrayKlass.hpp

Print this page

        

*** 39,82 **** static const KlassID ID = ObjArrayKlassID; private: // If you add a new field that points to any metaspace object, you // must add this field to ObjArrayKlass::metaspace_pointers_do(). - Klass* _element_klass; // The klass of the elements of this array type Klass* _bottom_klass; // The one-dimensional type (InstanceKlass or TypeArrayKlass) // Constructor ObjArrayKlass(int n, Klass* element_klass, Symbol* name); static ObjArrayKlass* allocate(ClassLoaderData* loader_data, int n, Klass* k, Symbol* name, TRAPS); public: // For dummy objects ObjArrayKlass() {} ! // Instance variables ! Klass* element_klass() const { return _element_klass; } ! void set_element_klass(Klass* k) { _element_klass = k; } ! Klass** element_klass_addr() { return &_element_klass; } Klass* bottom_klass() const { return _bottom_klass; } void set_bottom_klass(Klass* k) { _bottom_klass = k; } Klass** bottom_klass_addr() { return &_bottom_klass; } ModuleEntry* module() const; PackageEntry* package() const; - // Compiler/Interpreter offset - static ByteSize element_klass_offset() { return in_ByteSize(offset_of(ObjArrayKlass, _element_klass)); } - // Dispatched operation bool can_be_primary_super_slow() const; GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots, Array<InstanceKlass*>* transitive_interfaces); DEBUG_ONLY(bool is_objArray_klass_slow() const { return true; }) int oop_size(oop obj) const; // Allocation ! static Klass* allocate_objArray_klass(ClassLoaderData* loader_data, int n, Klass* element_klass, TRAPS); objArrayOop allocate(int length, TRAPS); oop multi_allocate(int rank, jint* sizes, TRAPS); --- 39,77 ---- static const KlassID ID = ObjArrayKlassID; private: // If you add a new field that points to any metaspace object, you // must add this field to ObjArrayKlass::metaspace_pointers_do(). Klass* _bottom_klass; // The one-dimensional type (InstanceKlass or TypeArrayKlass) // Constructor ObjArrayKlass(int n, Klass* element_klass, Symbol* name); static ObjArrayKlass* allocate(ClassLoaderData* loader_data, int n, Klass* k, Symbol* name, TRAPS); public: // For dummy objects ObjArrayKlass() {} ! // if ObjArrayKlass is used to represent an LWorld "Q-type" value type array, the only thing we can give null-free (i.e. not flattened) ! // ArrayStorageProperties::empty meaning nothing special, array of references (possibly even to value types) ! ArrayStorageProperties storage_properties(); Klass* bottom_klass() const { return _bottom_klass; } void set_bottom_klass(Klass* k) { _bottom_klass = k; } Klass** bottom_klass_addr() { return &_bottom_klass; } ModuleEntry* module() const; PackageEntry* package() const; // Dispatched operation bool can_be_primary_super_slow() const; GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots, Array<InstanceKlass*>* transitive_interfaces); DEBUG_ONLY(bool is_objArray_klass_slow() const { return true; }) int oop_size(oop obj) const; // Allocation ! static Klass* allocate_objArray_klass(ArrayStorageProperties storage_props, int n, Klass* element_klass, TRAPS); objArrayOop allocate(int length, TRAPS); oop multi_allocate(int rank, jint* sizes, TRAPS);
*** 94,107 **** void do_copy(arrayOop s, size_t src_offset, arrayOop d, size_t dst_offset, int length, TRAPS); protected: // Returns the ObjArrayKlass for n'th dimension. ! virtual Klass* array_klass_impl(bool or_null, int n, TRAPS); // Returns the array class with this class as element type. ! virtual Klass* array_klass_impl(bool or_null, TRAPS); public: static ObjArrayKlass* cast(Klass* k) { return const_cast<ObjArrayKlass*>(cast(const_cast<const Klass*>(k))); --- 89,102 ---- void do_copy(arrayOop s, size_t src_offset, arrayOop d, size_t dst_offset, int length, TRAPS); protected: // Returns the ObjArrayKlass for n'th dimension. ! virtual Klass* array_klass_impl(ArrayStorageProperties storage_props, bool or_null, int n, TRAPS); // Returns the array class with this class as element type. ! virtual Klass* array_klass_impl(ArrayStorageProperties storage_props, bool or_null, TRAPS); public: static ObjArrayKlass* cast(Klass* k) { return const_cast<ObjArrayKlass*>(cast(const_cast<const Klass*>(k)));
< prev index next >