hotspot/src/share/vm/oops/instanceKlass.hpp
changeset 41669 2091069b6851
parent 41182 dbd59c1da636
child 42650 1f304d0c888b
equal deleted inserted replaced
41668:e9c6bbf513e5 41669:2091069b6851
   205   static const unsigned _misc_kind_class_loader = 2; // InstanceClassLoaderKlass
   205   static const unsigned _misc_kind_class_loader = 2; // InstanceClassLoaderKlass
   206   static const unsigned _misc_kind_mirror       = 3; // InstanceMirrorKlass
   206   static const unsigned _misc_kind_mirror       = 3; // InstanceMirrorKlass
   207 
   207 
   208   // Start after _misc_kind field.
   208   // Start after _misc_kind field.
   209   enum {
   209   enum {
   210     _misc_rewritten                = 1 << 2,  // methods rewritten.
   210     _misc_rewritten                           = 1 << 2,  // methods rewritten.
   211     _misc_has_nonstatic_fields     = 1 << 3,  // for sizing with UseCompressedOops
   211     _misc_has_nonstatic_fields                = 1 << 3,  // for sizing with UseCompressedOops
   212     _misc_should_verify_class      = 1 << 4,  // allow caching of preverification
   212     _misc_should_verify_class                 = 1 << 4,  // allow caching of preverification
   213     _misc_is_anonymous             = 1 << 5,  // has embedded _host_klass field
   213     _misc_is_anonymous                        = 1 << 5,  // has embedded _host_klass field
   214     _misc_is_contended             = 1 << 6,  // marked with contended annotation
   214     _misc_is_contended                        = 1 << 6,  // marked with contended annotation
   215     _misc_has_default_methods      = 1 << 7,  // class/superclass/implemented interfaces has default methods
   215     _misc_has_nonstatic_concrete_methods      = 1 << 7,  // class/superclass/implemented interfaces has non-static, concrete methods
   216     _misc_declares_default_methods = 1 << 8,  // directly declares default methods (any access)
   216     _misc_declares_nonstatic_concrete_methods = 1 << 8,  // directly declares non-static, concrete methods
   217     _misc_has_been_redefined       = 1 << 9,  // class has been redefined
   217     _misc_has_been_redefined                  = 1 << 9,  // class has been redefined
   218     _misc_is_scratch_class         = 1 << 10, // class is the redefined scratch class
   218     _misc_is_scratch_class                    = 1 << 10, // class is the redefined scratch class
   219     _misc_is_shared_boot_class     = 1 << 11, // defining class loader is boot class loader
   219     _misc_is_shared_boot_class                = 1 << 11, // defining class loader is boot class loader
   220     _misc_is_shared_platform_class = 1 << 12, // defining class loader is platform class loader
   220     _misc_is_shared_platform_class            = 1 << 12, // defining class loader is platform class loader
   221     _misc_is_shared_app_class      = 1 << 13  // defining class loader is app class loader
   221     _misc_is_shared_app_class                 = 1 << 13  // defining class loader is app class loader
   222   };
   222   };
   223   u2 loader_type_bits() {
   223   u2 loader_type_bits() {
   224     return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class;
   224     return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class;
   225   }
   225   }
   226   u2              _misc_flags;
   226   u2              _misc_flags;
   812   }
   812   }
   813   JvmtiCachedClassFileData * get_cached_class_file() { return (JvmtiCachedClassFileData *)NULL; }
   813   JvmtiCachedClassFileData * get_cached_class_file() { return (JvmtiCachedClassFileData *)NULL; }
   814 
   814 
   815 #endif // INCLUDE_JVMTI
   815 #endif // INCLUDE_JVMTI
   816 
   816 
   817   bool has_default_methods() const {
   817   bool has_nonstatic_concrete_methods() const {
   818     return (_misc_flags & _misc_has_default_methods) != 0;
   818     return (_misc_flags & _misc_has_nonstatic_concrete_methods) != 0;
   819   }
   819   }
   820   void set_has_default_methods(bool b) {
   820   void set_has_nonstatic_concrete_methods(bool b) {
   821     if (b) {
   821     if (b) {
   822       _misc_flags |= _misc_has_default_methods;
   822       _misc_flags |= _misc_has_nonstatic_concrete_methods;
   823     } else {
   823     } else {
   824       _misc_flags &= ~_misc_has_default_methods;
   824       _misc_flags &= ~_misc_has_nonstatic_concrete_methods;
   825     }
   825     }
   826   }
   826   }
   827 
   827 
   828   bool declares_default_methods() const {
   828   bool declares_nonstatic_concrete_methods() const {
   829     return (_misc_flags & _misc_declares_default_methods) != 0;
   829     return (_misc_flags & _misc_declares_nonstatic_concrete_methods) != 0;
   830   }
   830   }
   831   void set_declares_default_methods(bool b) {
   831   void set_declares_nonstatic_concrete_methods(bool b) {
   832     if (b) {
   832     if (b) {
   833       _misc_flags |= _misc_declares_default_methods;
   833       _misc_flags |= _misc_declares_nonstatic_concrete_methods;
   834     } else {
   834     } else {
   835       _misc_flags &= ~_misc_declares_default_methods;
   835       _misc_flags &= ~_misc_declares_nonstatic_concrete_methods;
   836     }
   836     }
   837   }
   837   }
   838 
   838 
   839   // for adding methods, ConstMethod::UNSET_IDNUM means no more ids available
   839   // for adding methods, ConstMethod::UNSET_IDNUM means no more ids available
   840   inline u2 next_method_idnum();
   840   inline u2 next_method_idnum();