Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.hpp @ 7482:989155e2d07a
Merge with hs25-b15.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 16 Jan 2013 01:34:24 +0100 |
parents | 2cb439954abf 37a3e8b7a1e9 |
children | 3ac7d10a6572 |
comparison
equal
deleted
inserted
replaced
7381:6761a8f854a4 | 7482:989155e2d07a |
---|---|
29 #include "oops/annotations.hpp" | 29 #include "oops/annotations.hpp" |
30 #include "oops/constMethod.hpp" | 30 #include "oops/constMethod.hpp" |
31 #include "oops/fieldInfo.hpp" | 31 #include "oops/fieldInfo.hpp" |
32 #include "oops/instanceOop.hpp" | 32 #include "oops/instanceOop.hpp" |
33 #include "oops/klassVtable.hpp" | 33 #include "oops/klassVtable.hpp" |
34 #include "runtime/atomic.hpp" | |
34 #include "runtime/handles.hpp" | 35 #include "runtime/handles.hpp" |
35 #include "runtime/os.hpp" | 36 #include "runtime/os.hpp" |
36 #include "utilities/accessFlags.hpp" | 37 #include "utilities/accessFlags.hpp" |
37 #include "utilities/bitMap.inline.hpp" | 38 #include "utilities/bitMap.inline.hpp" |
38 | 39 |
168 being_initialized, // currently running class initializer | 169 being_initialized, // currently running class initializer |
169 fully_initialized, // initialized (successfull final state) | 170 fully_initialized, // initialized (successfull final state) |
170 initialization_error // error happened during initialization | 171 initialization_error // error happened during initialization |
171 }; | 172 }; |
172 | 173 |
174 static int number_of_instance_classes() { return _total_instanceKlass_count; } | |
175 | |
176 private: | |
177 static volatile int _total_instanceKlass_count; | |
178 | |
173 protected: | 179 protected: |
174 // Protection domain. | 180 // Protection domain. |
175 oop _protection_domain; | 181 oop _protection_domain; |
176 // Class signers. | 182 // Class signers. |
177 objArrayOop _signers; | 183 objArrayOop _signers; |
452 void initialize(TRAPS); | 458 void initialize(TRAPS); |
453 void link_class(TRAPS); | 459 void link_class(TRAPS); |
454 bool link_class_or_fail(TRAPS); // returns false on failure | 460 bool link_class_or_fail(TRAPS); // returns false on failure |
455 void unlink_class(); | 461 void unlink_class(); |
456 void rewrite_class(TRAPS); | 462 void rewrite_class(TRAPS); |
457 void relocate_and_link_methods(TRAPS); | 463 void link_methods(TRAPS); |
458 Method* class_initializer(); | 464 Method* class_initializer(); |
459 | 465 |
460 // set the class to initialized if no static initializer is present | 466 // set the class to initialized if no static initializer is present |
461 void eager_initialize(Thread *thread); | 467 void eager_initialize(Thread *thread); |
462 | 468 |
534 if (value) { | 540 if (value) { |
535 _misc_flags |= _misc_is_anonymous; | 541 _misc_flags |= _misc_is_anonymous; |
536 } else { | 542 } else { |
537 _misc_flags &= ~_misc_is_anonymous; | 543 _misc_flags &= ~_misc_is_anonymous; |
538 } | 544 } |
545 } | |
546 | |
547 // Oop that keeps the metadata for this class from being unloaded | |
548 // in places where the metadata is stored in other places, like nmethods | |
549 oop klass_holder() const { | |
550 return is_anonymous() ? java_mirror() : class_loader(); | |
539 } | 551 } |
540 | 552 |
541 // signers | 553 // signers |
542 objArrayOop signers() const { return _signers; } | 554 objArrayOop signers() const { return _signers; } |
543 void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); } | 555 void set_signers(objArrayOop s) { klass_oop_store((oop*)&_signers, s); } |
648 return annotations()->class_annotations(); | 660 return annotations()->class_annotations(); |
649 } | 661 } |
650 Array<AnnotationArray*>* fields_annotations() const { | 662 Array<AnnotationArray*>* fields_annotations() const { |
651 if (annotations() == NULL) return NULL; | 663 if (annotations() == NULL) return NULL; |
652 return annotations()->fields_annotations(); | 664 return annotations()->fields_annotations(); |
665 } | |
666 Annotations* type_annotations() const { | |
667 if (annotations() == NULL) return NULL; | |
668 return annotations()->type_annotations(); | |
653 } | 669 } |
654 | 670 |
655 // allocation | 671 // allocation |
656 instanceOop allocate_instance(TRAPS); | 672 instanceOop allocate_instance(TRAPS); |
657 | 673 |