Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.hpp @ 7643:3ac7d10a6572
Merge with hsx25/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 31 Jan 2013 15:42:25 +0100 |
parents | 989155e2d07a 212c5b9c38e7 |
children | 5fc51c1ecdeb |
comparison
equal
deleted
inserted
replaced
7573:17b6a63fe7c2 | 7643:3ac7d10a6572 |
---|---|
223 int _static_field_size; // number words used by static fields (oop and non-oop) in this klass | 223 int _static_field_size; // number words used by static fields (oop and non-oop) in this klass |
224 u2 _static_oop_field_count;// number of static oop fields in this klass | 224 u2 _static_oop_field_count;// number of static oop fields in this klass |
225 u2 _java_fields_count; // The number of declared Java fields | 225 u2 _java_fields_count; // The number of declared Java fields |
226 int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks | 226 int _nonstatic_oop_map_size;// size in words of nonstatic oop map blocks |
227 | 227 |
228 // _is_marked_dependent can be set concurrently, thus cannot be part of the | |
229 // _misc_flags. | |
228 bool _is_marked_dependent; // used for marking during flushing and deoptimization | 230 bool _is_marked_dependent; // used for marking during flushing and deoptimization |
231 | |
229 enum { | 232 enum { |
230 _misc_rewritten = 1 << 0, // methods rewritten. | 233 _misc_rewritten = 1 << 0, // methods rewritten. |
231 _misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops | 234 _misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops |
232 _misc_should_verify_class = 1 << 2, // allow caching of preverification | 235 _misc_should_verify_class = 1 << 2, // allow caching of preverification |
233 _misc_is_anonymous = 1 << 3 // has embedded _inner_classes field | 236 _misc_is_anonymous = 1 << 3, // has embedded _inner_classes field |
237 _misc_is_contended = 1 << 4, // marked with contended annotation | |
238 _misc_has_default_methods = 1 << 5 // class/superclass/implemented interfaces has default methods | |
234 }; | 239 }; |
235 u2 _misc_flags; | 240 u2 _misc_flags; |
236 u2 _minor_version; // minor version number of class file | 241 u2 _minor_version; // minor version number of class file |
237 u2 _major_version; // major version number of class file | 242 u2 _major_version; // major version number of class file |
238 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) |
251 // JVMTI fields can be moved to their own structure - see 6315920 | 256 // JVMTI fields can be moved to their own structure - see 6315920 |
252 unsigned char * _cached_class_file_bytes; // JVMTI: cached class file, before retransformable agent modified it in CFLH | 257 unsigned char * _cached_class_file_bytes; // JVMTI: cached class file, before retransformable agent modified it in CFLH |
253 jint _cached_class_file_len; // JVMTI: length of above | 258 jint _cached_class_file_len; // JVMTI: length of above |
254 JvmtiCachedClassFieldMap* _jvmti_cached_class_field_map; // JVMTI: used during heap iteration | 259 JvmtiCachedClassFieldMap* _jvmti_cached_class_field_map; // JVMTI: used during heap iteration |
255 | 260 |
256 // true if class, superclass, or implemented interfaces have default methods | |
257 bool _has_default_methods; | |
258 | |
259 volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change | |
260 // Method array. | 261 // Method array. |
261 Array<Method*>* _methods; | 262 Array<Method*>* _methods; |
262 // Interface (Klass*s) this class declares locally to implement. | 263 // Interface (Klass*s) this class declares locally to implement. |
263 Array<Klass*>* _local_interfaces; | 264 Array<Klass*>* _local_interfaces; |
264 // Interface (Klass*s) this class implements transitively. | 265 // Interface (Klass*s) this class implements transitively. |
278 // [generic signature index] | 279 // [generic signature index] |
279 // [generic signature index] | 280 // [generic signature index] |
280 // ... | 281 // ... |
281 Array<u2>* _fields; | 282 Array<u2>* _fields; |
282 | 283 |
284 volatile u2 _idnum_allocated_count; // JNI/JVMTI: increments with the addition of methods, old ids don't change | |
285 | |
283 // Class states are defined as ClassState (see above). | 286 // Class states are defined as ClassState (see above). |
284 // Place the _init_state here to utilize the unused 2-byte after | 287 // Place the _init_state here to utilize the unused 2-byte after |
285 // _idnum_allocated_count. | 288 // _idnum_allocated_count. |
286 u1 _init_state; // state of class | 289 u1 _init_state; // state of class |
287 | 290 |
548 // 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 |
549 oop klass_holder() const { | 552 oop klass_holder() const { |
550 return is_anonymous() ? java_mirror() : class_loader(); | 553 return is_anonymous() ? java_mirror() : class_loader(); |
551 } | 554 } |
552 | 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 | |
553 // signers | 567 // signers |
554 objArrayOop signers() const { return _signers; } | 568 objArrayOop signers() const { return _signers; } |
555 void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); } | 569 void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); } |
556 | 570 |
557 // source file name | 571 // source file name |
614 } | 628 } |
615 JvmtiCachedClassFieldMap* jvmti_cached_class_field_map() const { | 629 JvmtiCachedClassFieldMap* jvmti_cached_class_field_map() const { |
616 return _jvmti_cached_class_field_map; | 630 return _jvmti_cached_class_field_map; |
617 } | 631 } |
618 | 632 |
619 bool has_default_methods() const { return _has_default_methods; } | 633 bool has_default_methods() const { |
620 void set_has_default_methods(bool b) { _has_default_methods = b; } | 634 return (_misc_flags & _misc_has_default_methods) != 0; |
635 } | |
636 void set_has_default_methods(bool b) { | |
637 if (b) { | |
638 _misc_flags |= _misc_has_default_methods; | |
639 } else { | |
640 _misc_flags &= ~_misc_has_default_methods; | |
641 } | |
642 } | |
621 | 643 |
622 // for adding methods, ConstMethod::UNSET_IDNUM means no more ids available | 644 // for adding methods, ConstMethod::UNSET_IDNUM means no more ids available |
623 inline u2 next_method_idnum(); | 645 inline u2 next_method_idnum(); |
624 void set_initial_method_idnum(u2 value) { _idnum_allocated_count = value; } | 646 void set_initial_method_idnum(u2 value) { _idnum_allocated_count = value; } |
625 | 647 |