< prev index next > src/hotspot/share/oops/arrayKlass.hpp
Print this page
// ArrayKlass is the abstract baseclass for all array classes
class ArrayKlass: public Klass {
friend class VMStructs;
+
+ public:
+ enum ArrayProperties : uint32_t {
+ DEFAULT = 0,
+ NULL_RESTRICTED = 1 << 0,
+ NON_ATOMIC = 1 << 1,
+ // FINAL = 1 << 2,
+ // VOLATILE = 1 << 3
+ INVALID = 1 << 4,
+ DUMMY = 1 << 5 // Just to transition the code, to be removed ASAP
+ };
+
+ static bool is_null_restricted(ArrayProperties props) { return (props & NULL_RESTRICTED) != 0; }
+ static bool is_non_atomic(ArrayProperties props) { return (props & NON_ATOMIC) != 0; }
+
private:
// If you add a new field that points to any metaspace object, you
// must add this field to ArrayKlass::metaspace_pointers_do().
int _dimension; // This is n'th-dimensional array.
+ ArrayProperties _properties;
ObjArrayKlass* volatile _higher_dimension; // Refers the (n+1)'th-dimensional array (if present).
ArrayKlass* volatile _lower_dimension; // Refers the (n-1)'th-dimensional array (if present).
protected:
// Constructors
// The constructor with the Symbol argument does the real array
// initialization, the other is a dummy
- ArrayKlass(Symbol* name, KlassKind kind);
+ ArrayKlass(Symbol* name, KlassKind kind, ArrayProperties props, markWord prototype_header = markWord::prototype());
ArrayKlass();
+ // Create array_name for element klass
+ static Symbol* create_element_klass_array_name(Klass* element_klass, TRAPS);
+
void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw();
public:
+
// Testing operation
DEBUG_ONLY(bool is_array_klass_slow() const { return true; })
// Returns the ObjArrayKlass for n'th dimension.
ArrayKlass* array_klass(int n, TRAPS);
// Instance variables
int dimension() const { return _dimension; }
void set_dimension(int dimension) { _dimension = dimension; }
+ ArrayProperties properties() const { return _properties; }
+ void set_properties(ArrayProperties props) { _properties = props; }
+ static ByteSize properties_offset() { return byte_offset_of(ArrayKlass, _properties); }
+
ObjArrayKlass* higher_dimension() const { return _higher_dimension; }
inline ObjArrayKlass* higher_dimension_acquire() const; // load with acquire semantics
void set_higher_dimension(ObjArrayKlass* k) { _higher_dimension = k; }
inline void release_set_higher_dimension(ObjArrayKlass* k); // store with release semantics
}
GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots,
Array<InstanceKlass*>* transitive_interfaces);
+ oop component_mirror() const;
+
// Sizing
static int static_size(int header_size);
virtual void metaspace_pointers_do(MetaspaceClosure* iter);
void verify_on(outputStream* st);
void oop_verify_on(oop obj, outputStream* st);
};
+ class ArrayDescription : public StackObj {
+ public:
+ Klass::KlassKind _kind;
+ ArrayKlass::ArrayProperties _properties;
+ LayoutKind _layout_kind;
+ ArrayDescription(Klass::KlassKind k, ArrayKlass::ArrayProperties p, LayoutKind lk) { _kind = k; _properties = p; _layout_kind = lk; }
+ };
+
#endif // SHARE_OOPS_ARRAYKLASS_HPP
< prev index next >