< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page




 240   // Constant pool index to the utf8 entry of the Generic signature,
 241   // or 0 if none.
 242   u2              _generic_signature_index;
 243   // Constant pool index to the utf8 entry for the name of source file
 244   // containing this klass, 0 if not specified.
 245   u2              _source_file_name_index;
 246   u2              _static_oop_field_count;// number of static oop fields in this klass
 247   u2              _java_fields_count;    // The number of declared Java fields
 248   int             _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
 249 
 250   int             _itable_len;           // length of Java itable (in words)
 251   // _is_marked_dependent can be set concurrently, thus cannot be part of the
 252   // _misc_flags.
 253   bool            _is_marked_dependent;  // used for marking during flushing and deoptimization
 254 
 255  public:
 256   enum {
 257     _extra_is_being_redefined   = 1 << 0, // used for locking redefinition
 258     _extra_has_resolved_methods = 1 << 1, // resolved methods table entries added for this class
 259     _extra_has_value_fields     = 1 << 2, // has value fields and related embedded section is not empty
 260     _extra_is_bufferable        = 1 << 3  // value can be buffered out side of the Java heap

 261   };
 262 
 263  protected:
 264   u1              _extra_flags;
 265 
 266   // The low three bits of _misc_flags contains the kind field.
 267   // This can be used to quickly discriminate among the five kinds of
 268   // InstanceKlass.
 269 
 270   static const unsigned _misc_kind_field_size = 3;
 271   static const unsigned _misc_kind_field_pos  = 0;
 272   static const unsigned _misc_kind_field_mask = (1u << _misc_kind_field_size) - 1u;
 273 
 274   static const unsigned _misc_kind_other        = 0; // concrete InstanceKlass
 275   static const unsigned _misc_kind_reference    = 1; // InstanceRefKlass
 276   static const unsigned _misc_kind_class_loader = 2; // InstanceClassLoaderKlass
 277   static const unsigned _misc_kind_mirror       = 3; // InstanceMirrorKlass
 278   static const unsigned _misc_kind_value_type   = 4; // ValueKlass
 279 
 280   // Start after _misc_kind field.


 407   void set_class_loader_type(s2 loader_type);
 408 
 409   bool has_nonstatic_fields() const        {
 410     return (_misc_flags & _misc_has_nonstatic_fields) != 0;
 411   }
 412   void set_has_nonstatic_fields(bool b)    {
 413     if (b) {
 414       _misc_flags |= _misc_has_nonstatic_fields;
 415     } else {
 416       _misc_flags &= ~_misc_has_nonstatic_fields;
 417     }
 418   }
 419 
 420   bool has_value_fields() const          {
 421     return (_extra_flags & _extra_has_value_fields) != 0;
 422   }
 423   void set_has_value_fields()  {
 424     _extra_flags |= _extra_has_value_fields;
 425   }
 426 







 427   // field sizes
 428   int nonstatic_field_size() const         { return _nonstatic_field_size; }
 429   void set_nonstatic_field_size(int size)  { _nonstatic_field_size = size; }
 430 
 431   int static_field_size() const            { return _static_field_size; }
 432   void set_static_field_size(int size)     { _static_field_size = size; }
 433 
 434   int static_oop_field_count() const       { return (int)_static_oop_field_count; }
 435   void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; }
 436 
 437   // Java itable
 438   int  itable_length() const               { return _itable_len; }
 439   void set_itable_length(int len)          { _itable_len = len; }
 440 
 441   // array klasses
 442   Klass* array_klasses() const             { return _array_klasses; }
 443   inline Klass* array_klasses_acquire() const; // load with acquire semantics
 444   void set_array_klasses(Klass* k)         { _array_klasses = k; }
 445   inline void release_set_array_klasses(Klass* k); // store with release semantics
 446 




 240   // Constant pool index to the utf8 entry of the Generic signature,
 241   // or 0 if none.
 242   u2              _generic_signature_index;
 243   // Constant pool index to the utf8 entry for the name of source file
 244   // containing this klass, 0 if not specified.
 245   u2              _source_file_name_index;
 246   u2              _static_oop_field_count;// number of static oop fields in this klass
 247   u2              _java_fields_count;    // The number of declared Java fields
 248   int             _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks
 249 
 250   int             _itable_len;           // length of Java itable (in words)
 251   // _is_marked_dependent can be set concurrently, thus cannot be part of the
 252   // _misc_flags.
 253   bool            _is_marked_dependent;  // used for marking during flushing and deoptimization
 254 
 255  public:
 256   enum {
 257     _extra_is_being_redefined   = 1 << 0, // used for locking redefinition
 258     _extra_has_resolved_methods = 1 << 1, // resolved methods table entries added for this class
 259     _extra_has_value_fields     = 1 << 2, // has value fields and related embedded section is not empty
 260     _extra_is_bufferable        = 1 << 3, // value can be buffered out side of the Java heap
 261     _extra_is_empty_value       = 1 << 4  // empty value type
 262   };
 263 
 264  protected:
 265   u1              _extra_flags;
 266 
 267   // The low three bits of _misc_flags contains the kind field.
 268   // This can be used to quickly discriminate among the five kinds of
 269   // InstanceKlass.
 270 
 271   static const unsigned _misc_kind_field_size = 3;
 272   static const unsigned _misc_kind_field_pos  = 0;
 273   static const unsigned _misc_kind_field_mask = (1u << _misc_kind_field_size) - 1u;
 274 
 275   static const unsigned _misc_kind_other        = 0; // concrete InstanceKlass
 276   static const unsigned _misc_kind_reference    = 1; // InstanceRefKlass
 277   static const unsigned _misc_kind_class_loader = 2; // InstanceClassLoaderKlass
 278   static const unsigned _misc_kind_mirror       = 3; // InstanceMirrorKlass
 279   static const unsigned _misc_kind_value_type   = 4; // ValueKlass
 280 
 281   // Start after _misc_kind field.


 408   void set_class_loader_type(s2 loader_type);
 409 
 410   bool has_nonstatic_fields() const        {
 411     return (_misc_flags & _misc_has_nonstatic_fields) != 0;
 412   }
 413   void set_has_nonstatic_fields(bool b)    {
 414     if (b) {
 415       _misc_flags |= _misc_has_nonstatic_fields;
 416     } else {
 417       _misc_flags &= ~_misc_has_nonstatic_fields;
 418     }
 419   }
 420 
 421   bool has_value_fields() const          {
 422     return (_extra_flags & _extra_has_value_fields) != 0;
 423   }
 424   void set_has_value_fields()  {
 425     _extra_flags |= _extra_has_value_fields;
 426   }
 427 
 428   bool is_empty_value() const {
 429     return (_extra_flags & _extra_is_empty_value) != 0;
 430   }
 431   void set_is_empty_value() {
 432     _extra_flags |= _extra_is_empty_value;
 433   }
 434 
 435   // field sizes
 436   int nonstatic_field_size() const         { return _nonstatic_field_size; }
 437   void set_nonstatic_field_size(int size)  { _nonstatic_field_size = size; }
 438 
 439   int static_field_size() const            { return _static_field_size; }
 440   void set_static_field_size(int size)     { _static_field_size = size; }
 441 
 442   int static_oop_field_count() const       { return (int)_static_oop_field_count; }
 443   void set_static_oop_field_count(u2 size) { _static_oop_field_count = size; }
 444 
 445   // Java itable
 446   int  itable_length() const               { return _itable_len; }
 447   void set_itable_length(int len)          { _itable_len = len; }
 448 
 449   // array klasses
 450   Klass* array_klasses() const             { return _array_klasses; }
 451   inline Klass* array_klasses_acquire() const; // load with acquire semantics
 452   void set_array_klasses(Klass* k)         { _array_klasses = k; }
 453   inline void release_set_array_klasses(Klass* k); // store with release semantics
 454 


< prev index next >