< prev index next >

hotspot/src/share/vm/oops/instanceKlass.hpp

Print this page




 196   int             _nonstatic_field_size;
 197   int             _static_field_size;    // number words used by static fields (oop and non-oop) in this klass
 198   // Constant pool index to the utf8 entry of the Generic signature,
 199   // or 0 if none.
 200   u2              _generic_signature_index;
 201   // Constant pool index to the utf8 entry for the name of source file
 202   // containing this klass, 0 if not specified.
 203   u2              _source_file_name_index;
 204   u2              _static_oop_field_count;// number of static oop fields in this klass
 205   u2              _java_fields_count;    // The number of declared Java fields
 206   int             _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
 207 
 208   int             _itable_len;           // length of Java itable (in words)
 209   // _is_marked_dependent can be set concurrently, thus cannot be part of the
 210   // _misc_flags.
 211   bool            _is_marked_dependent;  // used for marking during flushing and deoptimization
 212 
 213  public:
 214   enum {
 215     _extra_is_being_redefined   = 1 << 0, // used for locking redefinition
 216     _extra_has_value_fields     = 1 << 1, // has value fields and related embedded section is not empty
 217     _extra_is_bufferable        = 1 << 2, // value can be buffered out side of the Java heap
 218     _extra_has_vcc_klass        = 1 << 3, // has a pointer to its Value Capable Class (MVT)
 219     _extra_has_resolved_methods = 1 << 4  // resolved methods table entries added for this class

 220   };
 221 
 222  protected:
 223   u1              _extra_flags;
 224 
 225   // The low three bits of _misc_flags contains the kind field.
 226   // This can be used to quickly discriminate among the five kinds of
 227   // InstanceKlass.
 228 
 229   static const unsigned _misc_kind_field_size = 3;
 230   static const unsigned _misc_kind_field_pos  = 0;
 231   static const unsigned _misc_kind_field_mask = (1u << _misc_kind_field_size) - 1u;
 232 
 233   static const unsigned _misc_kind_other        = 0; // concrete InstanceKlass
 234   static const unsigned _misc_kind_reference    = 1; // InstanceRefKlass
 235   static const unsigned _misc_kind_class_loader = 2; // InstanceClassLoaderKlass
 236   static const unsigned _misc_kind_mirror       = 3; // InstanceMirrorKlass
 237   static const unsigned _misc_kind_value_type   = 4; // ValueKlass
 238 
 239   // Start after _misc_kind field.


 382       _misc_flags |= _misc_has_nonstatic_fields;
 383     } else {
 384       _misc_flags &= ~_misc_has_nonstatic_fields;
 385     }
 386   }
 387 
 388   bool has_value_fields() const          {
 389     return (_extra_flags & _extra_has_value_fields) != 0;
 390   }
 391   void set_has_value_fields()  {
 392     _extra_flags |= _extra_has_value_fields;
 393   }
 394 
 395   bool has_vcc_klass() const {
 396     return (_extra_flags & _extra_has_vcc_klass) != 0;
 397   }
 398   void set_has_vcc_klass() {
 399     _extra_flags |= _extra_has_vcc_klass;
 400   }
 401 







 402 
 403   // field sizes
 404   int nonstatic_field_size() const         { return _nonstatic_field_size; }
 405   void set_nonstatic_field_size(int size)  { _nonstatic_field_size = size; }
 406 
 407   int static_field_size() const            { return _static_field_size; }
 408   void set_static_field_size(int size)     { _static_field_size = size; }
 409 
 410   int static_oop_field_count() const       { return (int)_static_oop_field_count; }
 411   void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; }
 412 
 413   // Java itable
 414   int  itable_length() const               { return _itable_len; }
 415   void set_itable_length(int len)          { _itable_len = len; }
 416 
 417   // array klasses
 418   Klass* array_klasses() const             { return _array_klasses; }
 419   inline Klass* array_klasses_acquire() const; // load with acquire semantics
 420   void set_array_klasses(Klass* k)         { _array_klasses = k; }
 421   inline void release_set_array_klasses(Klass* k); // store with release semantics




 196   int             _nonstatic_field_size;
 197   int             _static_field_size;    // number words used by static fields (oop and non-oop) in this klass
 198   // Constant pool index to the utf8 entry of the Generic signature,
 199   // or 0 if none.
 200   u2              _generic_signature_index;
 201   // Constant pool index to the utf8 entry for the name of source file
 202   // containing this klass, 0 if not specified.
 203   u2              _source_file_name_index;
 204   u2              _static_oop_field_count;// number of static oop fields in this klass
 205   u2              _java_fields_count;    // The number of declared Java fields
 206   int             _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
 207 
 208   int             _itable_len;           // length of Java itable (in words)
 209   // _is_marked_dependent can be set concurrently, thus cannot be part of the
 210   // _misc_flags.
 211   bool            _is_marked_dependent;  // used for marking during flushing and deoptimization
 212 
 213  public:
 214   enum {
 215     _extra_is_being_redefined   = 1 << 0, // used for locking redefinition
 216     _extra_has_resolved_methods = 1 << 1, // resolved methods table entries added for this class
 217     _extra_has_value_fields     = 1 << 2, // has value fields and related embedded section is not empty
 218     _extra_is_bufferable        = 1 << 3, // value can be buffered out side of the Java heap
 219     _extra_has_vcc_klass        = 1 << 4, // has a pointer to its Value Capable Class (MVT)
 220     _extra_has_vcc_annotation   = 1 << 5
 221   };
 222 
 223  protected:
 224   u1              _extra_flags;
 225 
 226   // The low three bits of _misc_flags contains the kind field.
 227   // This can be used to quickly discriminate among the five kinds of
 228   // InstanceKlass.
 229 
 230   static const unsigned _misc_kind_field_size = 3;
 231   static const unsigned _misc_kind_field_pos  = 0;
 232   static const unsigned _misc_kind_field_mask = (1u << _misc_kind_field_size) - 1u;
 233 
 234   static const unsigned _misc_kind_other        = 0; // concrete InstanceKlass
 235   static const unsigned _misc_kind_reference    = 1; // InstanceRefKlass
 236   static const unsigned _misc_kind_class_loader = 2; // InstanceClassLoaderKlass
 237   static const unsigned _misc_kind_mirror       = 3; // InstanceMirrorKlass
 238   static const unsigned _misc_kind_value_type   = 4; // ValueKlass
 239 
 240   // Start after _misc_kind field.


 383       _misc_flags |= _misc_has_nonstatic_fields;
 384     } else {
 385       _misc_flags &= ~_misc_has_nonstatic_fields;
 386     }
 387   }
 388 
 389   bool has_value_fields() const          {
 390     return (_extra_flags & _extra_has_value_fields) != 0;
 391   }
 392   void set_has_value_fields()  {
 393     _extra_flags |= _extra_has_value_fields;
 394   }
 395 
 396   bool has_vcc_klass() const {
 397     return (_extra_flags & _extra_has_vcc_klass) != 0;
 398   }
 399   void set_has_vcc_klass() {
 400     _extra_flags |= _extra_has_vcc_klass;
 401   }
 402 
 403   bool has_vcc_annotation() const {
 404     return (_extra_flags &_extra_has_vcc_annotation) != 0;
 405   }
 406 
 407   void set_has_vcc_annotation() {
 408     _extra_flags |= _extra_has_vcc_annotation;
 409   }
 410 
 411   // field sizes
 412   int nonstatic_field_size() const         { return _nonstatic_field_size; }
 413   void set_nonstatic_field_size(int size)  { _nonstatic_field_size = size; }
 414 
 415   int static_field_size() const            { return _static_field_size; }
 416   void set_static_field_size(int size)     { _static_field_size = size; }
 417 
 418   int static_oop_field_count() const       { return (int)_static_oop_field_count; }
 419   void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; }
 420 
 421   // Java itable
 422   int  itable_length() const               { return _itable_len; }
 423   void set_itable_length(int len)          { _itable_len = len; }
 424 
 425   // array klasses
 426   Klass* array_klasses() const             { return _array_klasses; }
 427   inline Klass* array_klasses_acquire() const; // load with acquire semantics
 428   void set_array_klasses(Klass* k)         { _array_klasses = k; }
 429   inline void release_set_array_klasses(Klass* k); // store with release semantics


< prev index next >