232 enum { |
232 enum { |
233 _misc_rewritten = 1 << 0, // methods rewritten. |
233 _misc_rewritten = 1 << 0, // methods rewritten. |
234 _misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops |
234 _misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops |
235 _misc_should_verify_class = 1 << 2, // allow caching of preverification |
235 _misc_should_verify_class = 1 << 2, // allow caching of preverification |
236 _misc_is_anonymous = 1 << 3, // has embedded _inner_classes field |
236 _misc_is_anonymous = 1 << 3, // has embedded _inner_classes field |
237 _misc_has_default_methods = 1 << 4 // class/superclass/implemented interfaces has default methods |
237 _misc_is_contended = 1 << 4, // marked with contended annotation |
|
238 _misc_has_default_methods = 1 << 5 // class/superclass/implemented interfaces has default methods |
238 }; |
239 }; |
239 u2 _misc_flags; |
240 u2 _misc_flags; |
240 u2 _minor_version; // minor version number of class file |
241 u2 _minor_version; // minor version number of class file |
241 u2 _major_version; // major version number of class file |
242 u2 _major_version; // major version number of class file |
242 Thread* _init_thread; // Pointer to current thread doing initialization (to handle recusive initialization) |
243 Thread* _init_thread; // Pointer to current thread doing initialization (to handle recusive initialization) |
550 // in places where the metadata is stored in other places, like nmethods |
551 // in places where the metadata is stored in other places, like nmethods |
551 oop klass_holder() const { |
552 oop klass_holder() const { |
552 return is_anonymous() ? java_mirror() : class_loader(); |
553 return is_anonymous() ? java_mirror() : class_loader(); |
553 } |
554 } |
554 |
555 |
|
556 bool is_contended() const { |
|
557 return (_misc_flags & _misc_is_contended) != 0; |
|
558 } |
|
559 void set_is_contended(bool value) { |
|
560 if (value) { |
|
561 _misc_flags |= _misc_is_contended; |
|
562 } else { |
|
563 _misc_flags &= ~_misc_is_contended; |
|
564 } |
|
565 } |
|
566 |
555 // signers |
567 // signers |
556 objArrayOop signers() const { return _signers; } |
568 objArrayOop signers() const { return _signers; } |
557 void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); } |
569 void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); } |
558 |
570 |
559 // source file name |
571 // source file name |