hotspot/src/share/vm/oops/instanceKlass.hpp
changeset 40887 8d35e19f5548
parent 40102 23ff468d69b4
child 40894 7d17619c0140
equal deleted inserted replaced
40886:98cb935dc074 40887:8d35e19f5548
   146   // Annotations for this class
   146   // Annotations for this class
   147   Annotations*    _annotations;
   147   Annotations*    _annotations;
   148   // Package this class is defined in
   148   // Package this class is defined in
   149   PackageEntry*   _package_entry;
   149   PackageEntry*   _package_entry;
   150   // Array classes holding elements of this class.
   150   // Array classes holding elements of this class.
   151   Klass*          _array_klasses;
   151   Klass* volatile _array_klasses;
   152   // Constant pool for this class.
   152   // Constant pool for this class.
   153   ConstantPool* _constants;
   153   ConstantPool* _constants;
   154   // The InnerClasses attribute and EnclosingMethod attribute. The
   154   // The InnerClasses attribute and EnclosingMethod attribute. The
   155   // _inner_classes is an array of shorts. If the class has InnerClasses
   155   // _inner_classes is an array of shorts. If the class has InnerClasses
   156   // attribute, then the _inner_classes array begins with 4-tuples of shorts
   156   // attribute, then the _inner_classes array begins with 4-tuples of shorts
   228   u2              _major_version;        // major version number of class file
   228   u2              _major_version;        // major version number of class file
   229   Thread*         _init_thread;          // Pointer to current thread doing initialization (to handle recusive initialization)
   229   Thread*         _init_thread;          // Pointer to current thread doing initialization (to handle recusive initialization)
   230   OopMapCache*    volatile _oop_map_cache;   // OopMapCache for all methods in the klass (allocated lazily)
   230   OopMapCache*    volatile _oop_map_cache;   // OopMapCache for all methods in the klass (allocated lazily)
   231   MemberNameTable* _member_names;        // Member names
   231   MemberNameTable* _member_names;        // Member names
   232   JNIid*          _jni_ids;              // First JNI identifier for static fields in this class
   232   JNIid*          _jni_ids;              // First JNI identifier for static fields in this class
   233   jmethodID*      _methods_jmethod_ids;  // jmethodIDs corresponding to method_idnum, or NULL if none
   233   jmethodID*      volatile _methods_jmethod_ids;  // jmethodIDs corresponding to method_idnum, or NULL if none
   234   intptr_t        _dep_context;          // packed DependencyContext structure
   234   intptr_t        _dep_context;          // packed DependencyContext structure
   235   nmethod*        _osr_nmethods_head;    // Head of list of on-stack replacement nmethods for this class
   235   nmethod*        _osr_nmethods_head;    // Head of list of on-stack replacement nmethods for this class
   236 #if INCLUDE_JVMTI
   236 #if INCLUDE_JVMTI
   237   BreakpointInfo* _breakpoints;          // bpt lists, managed by Method*
   237   BreakpointInfo* _breakpoints;          // bpt lists, managed by Method*
   238   // Linked instanceKlasses of previous versions
   238   // Linked instanceKlasses of previous versions
   366   int  itable_length() const               { return _itable_len; }
   366   int  itable_length() const               { return _itable_len; }
   367   void set_itable_length(int len)          { _itable_len = len; }
   367   void set_itable_length(int len)          { _itable_len = len; }
   368 
   368 
   369   // array klasses
   369   // array klasses
   370   Klass* array_klasses() const             { return _array_klasses; }
   370   Klass* array_klasses() const             { return _array_klasses; }
       
   371   inline Klass* array_klasses_acquire() const; // load with acquire semantics
   371   void set_array_klasses(Klass* k)         { _array_klasses = k; }
   372   void set_array_klasses(Klass* k)         { _array_klasses = k; }
       
   373   inline void release_set_array_klasses(Klass* k); // store with release semantics
   372 
   374 
   373   // methods
   375   // methods
   374   Array<Method*>* methods() const          { return _methods; }
   376   Array<Method*>* methods() const          { return _methods; }
   375   void set_methods(Array<Method*>* a)      { _methods = a; }
   377   void set_methods(Array<Method*>* a)      { _methods = a; }
   376   Method* method_with_idnum(int idnum);
   378   Method* method_with_idnum(int idnum);
  1236   // The RedefineClasses() API can cause new method idnums to be needed
  1238   // The RedefineClasses() API can cause new method idnums to be needed
  1237   // which will cause the caches to grow. Safety requires different
  1239   // which will cause the caches to grow. Safety requires different
  1238   // cache management logic if the caches can grow instead of just
  1240   // cache management logic if the caches can grow instead of just
  1239   // going from NULL to non-NULL.
  1241   // going from NULL to non-NULL.
  1240   bool idnum_can_increment() const      { return has_been_redefined(); }
  1242   bool idnum_can_increment() const      { return has_been_redefined(); }
  1241   jmethodID* methods_jmethod_ids_acquire() const
  1243   inline jmethodID* methods_jmethod_ids_acquire() const;
  1242          { return (jmethodID*)OrderAccess::load_ptr_acquire(&_methods_jmethod_ids); }
  1244   inline void release_set_methods_jmethod_ids(jmethodID* jmeths);
  1243   void release_set_methods_jmethod_ids(jmethodID* jmeths)
       
  1244          { OrderAccess::release_store_ptr(&_methods_jmethod_ids, jmeths); }
       
  1245 
  1245 
  1246   // Lock during initialization
  1246   // Lock during initialization
  1247 public:
  1247 public:
  1248   // Lock for (1) initialization; (2) access to the ConstantPool of this class.
  1248   // Lock for (1) initialization; (2) access to the ConstantPool of this class.
  1249   // Must be one per class and it has to be a VM internal object so java code
  1249   // Must be one per class and it has to be a VM internal object so java code