src/share/vm/oops/instanceKlass.hpp

Print this page
rev 3 : [mq]: anonk.patch


 130   // Array classes holding elements of this class.
 131   klassOop        _array_klasses;
 132   // Method array.
 133   objArrayOop     _methods;
 134   // Int array containing the original order of method in the class file (for
 135   // JVMTI).
 136   typeArrayOop    _method_ordering;
 137   // Interface (klassOops) this class declares locally to implement.
 138   objArrayOop     _local_interfaces;
 139   // Interface (klassOops) this class implements transitively.
 140   objArrayOop     _transitive_interfaces;
 141   // Instance and static variable information, 5-tuples of shorts [access, name
 142   // index, sig index, initval index, offset].
 143   typeArrayOop    _fields;
 144   // Constant pool for this class.
 145   constantPoolOop _constants;
 146   // Class loader used to load this class, NULL if VM loader used.
 147   oop             _class_loader;
 148   // Protection domain.
 149   oop             _protection_domain;


 150   // Class signers.
 151   objArrayOop     _signers;
 152   // Name of source file containing this klass, NULL if not specified.
 153   symbolOop       _source_file_name;
 154   // the source debug extension for this klass, NULL if not specified.
 155   symbolOop       _source_debug_extension;
 156   // inner_classes attribute.
 157   typeArrayOop    _inner_classes;
 158   // Implementors of this interface (not valid if it overflows)
 159   klassOop        _implementors[implementors_limit];
 160   // Generic signature, or null if none.
 161   symbolOop       _generic_signature;
 162   // Annotations for this class, or null if none.
 163   typeArrayOop    _class_annotations;
 164   // Annotation objects (byte arrays) for fields, or null if no annotations.
 165   // Indices correspond to entries (not indices) in fields array.
 166   objArrayOop     _fields_annotations;
 167   // Annotation objects (byte arrays) for methods, or null if no annotations.
 168   // Index is the idnum, which is initially the same as the methods array index.
 169   objArrayOop     _methods_annotations;


 353 
 354   // lookup operation (returns NULL if not found)
 355   methodOop uncached_lookup_method(symbolOop name, symbolOop signature) const;
 356 
 357   // lookup a method in all the interfaces that this class implements
 358   // (returns NULL if not found)
 359   methodOop lookup_method_in_all_interfaces(symbolOop name, symbolOop signature) const;
 360 
 361   // constant pool
 362   constantPoolOop constants() const        { return _constants; }
 363   void set_constants(constantPoolOop c)    { oop_store_without_check((oop*) &_constants, (oop) c); }
 364 
 365   // class loader
 366   oop class_loader() const                 { return _class_loader; }
 367   void set_class_loader(oop l)             { oop_store((oop*) &_class_loader, l); }
 368 
 369   // protection domain
 370   oop protection_domain()                  { return _protection_domain; }
 371   void set_protection_domain(oop pd)       { oop_store((oop*) &_protection_domain, pd); }
 372 





 373   // signers
 374   objArrayOop signers() const              { return _signers; }
 375   void set_signers(objArrayOop s)          { oop_store((oop*) &_signers, oop(s)); }
 376 
 377   // source file name
 378   symbolOop source_file_name() const       { return _source_file_name; }
 379   void set_source_file_name(symbolOop n)   { oop_store_without_check((oop*) &_source_file_name, (oop) n); }
 380 
 381   // minor and major version numbers of class file
 382   u2 minor_version() const                 { return _minor_version; }
 383   void set_minor_version(u2 minor_version) { _minor_version = minor_version; }
 384   u2 major_version() const                 { return _major_version; }
 385   void set_major_version(u2 major_version) { _major_version = major_version; }
 386 
 387   // source debug extension
 388   symbolOop source_debug_extension() const    { return _source_debug_extension; }
 389   void set_source_debug_extension(symbolOop n){ oop_store_without_check((oop*) &_source_debug_extension, (oop) n); }
 390 
 391   // nonstatic oop-map blocks
 392   int nonstatic_oop_map_size() const        { return _nonstatic_oop_map_size; }


 668 
 669   int* methods_cached_itable_indices_acquire() const
 670          { return (int*)OrderAccess::load_ptr_acquire(&_methods_cached_itable_indices); }
 671   void release_set_methods_cached_itable_indices(int* indices)
 672          { OrderAccess::release_store_ptr(&_methods_cached_itable_indices, indices); }
 673 
 674   inline typeArrayOop get_method_annotations_from(int idnum, objArrayOop annos);
 675   void set_annotations(objArrayOop md, objArrayOop* md_p)  { oop_store_without_check((oop*)md_p, (oop)md); }
 676   void set_methods_annotations_of(int idnum, typeArrayOop anno, objArrayOop* md_p);
 677 
 678   // Offsets for memory management
 679   oop* adr_array_klasses() const     { return (oop*)&this->_array_klasses;}
 680   oop* adr_methods() const           { return (oop*)&this->_methods;}
 681   oop* adr_method_ordering() const   { return (oop*)&this->_method_ordering;}
 682   oop* adr_local_interfaces() const  { return (oop*)&this->_local_interfaces;}
 683   oop* adr_transitive_interfaces() const  { return (oop*)&this->_transitive_interfaces;}
 684   oop* adr_fields() const            { return (oop*)&this->_fields;}
 685   oop* adr_constants() const         { return (oop*)&this->_constants;}
 686   oop* adr_class_loader() const      { return (oop*)&this->_class_loader;}
 687   oop* adr_protection_domain() const { return (oop*)&this->_protection_domain;}

 688   oop* adr_signers() const           { return (oop*)&this->_signers;}
 689   oop* adr_source_file_name() const  { return (oop*)&this->_source_file_name;}
 690   oop* adr_source_debug_extension() const { return (oop*)&this->_source_debug_extension;}
 691   oop* adr_inner_classes() const     { return (oop*)&this->_inner_classes;}
 692   oop* adr_implementors() const      { return (oop*)&this->_implementors[0];}
 693   oop* adr_generic_signature() const { return (oop*)&this->_generic_signature;}
 694   oop* adr_methods_jmethod_ids() const             { return (oop*)&this->_methods_jmethod_ids;}
 695   oop* adr_methods_cached_itable_indices() const   { return (oop*)&this->_methods_cached_itable_indices;}
 696   oop* adr_class_annotations() const   { return (oop*)&this->_class_annotations;}
 697   oop* adr_fields_annotations() const  { return (oop*)&this->_fields_annotations;}
 698   oop* adr_methods_annotations() const { return (oop*)&this->_methods_annotations;}
 699   oop* adr_methods_parameter_annotations() const { return (oop*)&this->_methods_parameter_annotations;}
 700   oop* adr_methods_default_annotations() const { return (oop*)&this->_methods_default_annotations;}
 701 
 702   // Static methods that are used to implement member methods where an exposed this pointer
 703   // is needed due to possible GCs
 704   static bool link_class_impl                           (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
 705   static bool verify_code                               (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
 706   static void initialize_impl                           (instanceKlassHandle this_oop, TRAPS);
 707   static void eager_initialize_impl                     (instanceKlassHandle this_oop);




 130   // Array classes holding elements of this class.
 131   klassOop        _array_klasses;
 132   // Method array.
 133   objArrayOop     _methods;
 134   // Int array containing the original order of method in the class file (for
 135   // JVMTI).
 136   typeArrayOop    _method_ordering;
 137   // Interface (klassOops) this class declares locally to implement.
 138   objArrayOop     _local_interfaces;
 139   // Interface (klassOops) this class implements transitively.
 140   objArrayOop     _transitive_interfaces;
 141   // Instance and static variable information, 5-tuples of shorts [access, name
 142   // index, sig index, initval index, offset].
 143   typeArrayOop    _fields;
 144   // Constant pool for this class.
 145   constantPoolOop _constants;
 146   // Class loader used to load this class, NULL if VM loader used.
 147   oop             _class_loader;
 148   // Protection domain.
 149   oop             _protection_domain;
 150   // Host class, which shares access with this class
 151   klassOop        _host_klass;
 152   // Class signers.
 153   objArrayOop     _signers;
 154   // Name of source file containing this klass, NULL if not specified.
 155   symbolOop       _source_file_name;
 156   // the source debug extension for this klass, NULL if not specified.
 157   symbolOop       _source_debug_extension;
 158   // inner_classes attribute.
 159   typeArrayOop    _inner_classes;
 160   // Implementors of this interface (not valid if it overflows)
 161   klassOop        _implementors[implementors_limit];
 162   // Generic signature, or null if none.
 163   symbolOop       _generic_signature;
 164   // Annotations for this class, or null if none.
 165   typeArrayOop    _class_annotations;
 166   // Annotation objects (byte arrays) for fields, or null if no annotations.
 167   // Indices correspond to entries (not indices) in fields array.
 168   objArrayOop     _fields_annotations;
 169   // Annotation objects (byte arrays) for methods, or null if no annotations.
 170   // Index is the idnum, which is initially the same as the methods array index.
 171   objArrayOop     _methods_annotations;


 355 
 356   // lookup operation (returns NULL if not found)
 357   methodOop uncached_lookup_method(symbolOop name, symbolOop signature) const;
 358 
 359   // lookup a method in all the interfaces that this class implements
 360   // (returns NULL if not found)
 361   methodOop lookup_method_in_all_interfaces(symbolOop name, symbolOop signature) const;
 362 
 363   // constant pool
 364   constantPoolOop constants() const        { return _constants; }
 365   void set_constants(constantPoolOop c)    { oop_store_without_check((oop*) &_constants, (oop) c); }
 366 
 367   // class loader
 368   oop class_loader() const                 { return _class_loader; }
 369   void set_class_loader(oop l)             { oop_store((oop*) &_class_loader, l); }
 370 
 371   // protection domain
 372   oop protection_domain()                  { return _protection_domain; }
 373   void set_protection_domain(oop pd)       { oop_store((oop*) &_protection_domain, pd); }
 374 
 375   // host class
 376   oop host_klass() const                   { return _host_klass; }
 377   void set_host_klass(oop host)            { oop_store((oop*) &_host_klass, host); }
 378   bool is_anonymous() const                { return _host_klass != NULL; }
 379 
 380   // signers
 381   objArrayOop signers() const              { return _signers; }
 382   void set_signers(objArrayOop s)          { oop_store((oop*) &_signers, oop(s)); }
 383 
 384   // source file name
 385   symbolOop source_file_name() const       { return _source_file_name; }
 386   void set_source_file_name(symbolOop n)   { oop_store_without_check((oop*) &_source_file_name, (oop) n); }
 387 
 388   // minor and major version numbers of class file
 389   u2 minor_version() const                 { return _minor_version; }
 390   void set_minor_version(u2 minor_version) { _minor_version = minor_version; }
 391   u2 major_version() const                 { return _major_version; }
 392   void set_major_version(u2 major_version) { _major_version = major_version; }
 393 
 394   // source debug extension
 395   symbolOop source_debug_extension() const    { return _source_debug_extension; }
 396   void set_source_debug_extension(symbolOop n){ oop_store_without_check((oop*) &_source_debug_extension, (oop) n); }
 397 
 398   // nonstatic oop-map blocks
 399   int nonstatic_oop_map_size() const        { return _nonstatic_oop_map_size; }


 675 
 676   int* methods_cached_itable_indices_acquire() const
 677          { return (int*)OrderAccess::load_ptr_acquire(&_methods_cached_itable_indices); }
 678   void release_set_methods_cached_itable_indices(int* indices)
 679          { OrderAccess::release_store_ptr(&_methods_cached_itable_indices, indices); }
 680 
 681   inline typeArrayOop get_method_annotations_from(int idnum, objArrayOop annos);
 682   void set_annotations(objArrayOop md, objArrayOop* md_p)  { oop_store_without_check((oop*)md_p, (oop)md); }
 683   void set_methods_annotations_of(int idnum, typeArrayOop anno, objArrayOop* md_p);
 684 
 685   // Offsets for memory management
 686   oop* adr_array_klasses() const     { return (oop*)&this->_array_klasses;}
 687   oop* adr_methods() const           { return (oop*)&this->_methods;}
 688   oop* adr_method_ordering() const   { return (oop*)&this->_method_ordering;}
 689   oop* adr_local_interfaces() const  { return (oop*)&this->_local_interfaces;}
 690   oop* adr_transitive_interfaces() const  { return (oop*)&this->_transitive_interfaces;}
 691   oop* adr_fields() const            { return (oop*)&this->_fields;}
 692   oop* adr_constants() const         { return (oop*)&this->_constants;}
 693   oop* adr_class_loader() const      { return (oop*)&this->_class_loader;}
 694   oop* adr_protection_domain() const { return (oop*)&this->_protection_domain;}
 695   oop* adr_host_klass() const        { return (oop*)&this->_host_klass;}
 696   oop* adr_signers() const           { return (oop*)&this->_signers;}
 697   oop* adr_source_file_name() const  { return (oop*)&this->_source_file_name;}
 698   oop* adr_source_debug_extension() const { return (oop*)&this->_source_debug_extension;}
 699   oop* adr_inner_classes() const     { return (oop*)&this->_inner_classes;}
 700   oop* adr_implementors() const      { return (oop*)&this->_implementors[0];}
 701   oop* adr_generic_signature() const { return (oop*)&this->_generic_signature;}
 702   oop* adr_methods_jmethod_ids() const             { return (oop*)&this->_methods_jmethod_ids;}
 703   oop* adr_methods_cached_itable_indices() const   { return (oop*)&this->_methods_cached_itable_indices;}
 704   oop* adr_class_annotations() const   { return (oop*)&this->_class_annotations;}
 705   oop* adr_fields_annotations() const  { return (oop*)&this->_fields_annotations;}
 706   oop* adr_methods_annotations() const { return (oop*)&this->_methods_annotations;}
 707   oop* adr_methods_parameter_annotations() const { return (oop*)&this->_methods_parameter_annotations;}
 708   oop* adr_methods_default_annotations() const { return (oop*)&this->_methods_default_annotations;}
 709 
 710   // Static methods that are used to implement member methods where an exposed this pointer
 711   // is needed due to possible GCs
 712   static bool link_class_impl                           (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
 713   static bool verify_code                               (instanceKlassHandle this_oop, bool throw_verifyerror, TRAPS);
 714   static void initialize_impl                           (instanceKlassHandle this_oop, TRAPS);
 715   static void eager_initialize_impl                     (instanceKlassHandle this_oop);