< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page




 145   jlong    _last_biased_lock_bulk_revocation_time;
 146   markOop  _prototype_header;   // Used when biased locking is both enabled and disabled for this type
 147   jint     _biased_lock_revocation_count;
 148 
 149   // vtable length
 150   int _vtable_len;
 151 
 152 private:
 153   // This is an index into FileMapHeader::_classpath_entry_table[], to
 154   // associate this class with the JAR file where it's loaded from during
 155   // dump time. If a class is not loaded from the shared archive, this field is
 156   // -1.
 157   jshort _shared_class_path_index;
 158 
 159   friend class SharedClassUtil;
 160 protected:
 161 
 162   // Constructor
 163   Klass();
 164 
 165   void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw();



 166 
 167  public:
 168   enum DefaultsLookupMode { find_defaults, skip_defaults };
 169   enum OverpassLookupMode { find_overpass, skip_overpass };
 170   enum StaticLookupMode   { find_static,   skip_static };
 171   enum PrivateLookupMode  { find_private,  skip_private };
 172 
 173   bool is_klass() const volatile { return true; }
 174 
 175   // super
 176   Klass* super() const               { return _super; }
 177   void set_super(Klass* k)           { _super = k; }
 178 
 179   // initializes _super link, _primary_supers & _secondary_supers arrays
 180   void initialize_supers(Klass* k, TRAPS);
 181   void initialize_supers_impl1(Klass* k);
 182   void initialize_supers_impl2(Klass* k);
 183 
 184   // klass-specific helper for initializing _secondary_supers
 185   virtual GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots);


 672   // Verification
 673   virtual void verify_on(outputStream* st);
 674   void verify() { verify_on(tty); }
 675 
 676 #ifndef PRODUCT
 677   bool verify_vtable_index(int index);
 678   bool verify_itable_index(int index);
 679 #endif
 680 
 681   virtual void oop_verify_on(oop obj, outputStream* st);
 682 
 683   static bool is_null(narrowKlass obj);
 684   static bool is_null(Klass* obj);
 685 
 686   // klass encoding for klass pointer in objects.
 687   static narrowKlass encode_klass_not_null(Klass* v);
 688   static narrowKlass encode_klass(Klass* v);
 689 
 690   static Klass* decode_klass_not_null(narrowKlass v);
 691   static Klass* decode_klass(narrowKlass v);



 692 };
 693 
 694 // Helper to convert the oop iterate macro suffixes into bool values that can be used by template functions.
 695 #define nvs_nv_to_bool true
 696 #define nvs_v_to_bool  false
 697 #define nvs_to_bool(nv_suffix) nvs##nv_suffix##_to_bool
 698 
 699 // Oop iteration macros for declarations.
 700 // Used to generate declarations in the *Klass header files.
 701 
 702 #define OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                                    \
 703   void oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure);                        \
 704   void oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr);
 705 
 706 #if INCLUDE_ALL_GCS
 707 #define OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix)               \
 708   void oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
 709 #endif // INCLUDE_ALL_GCS
 710 
 711 




 145   jlong    _last_biased_lock_bulk_revocation_time;
 146   markOop  _prototype_header;   // Used when biased locking is both enabled and disabled for this type
 147   jint     _biased_lock_revocation_count;
 148 
 149   // vtable length
 150   int _vtable_len;
 151 
 152 private:
 153   // This is an index into FileMapHeader::_classpath_entry_table[], to
 154   // associate this class with the JAR file where it's loaded from during
 155   // dump time. If a class is not loaded from the shared archive, this field is
 156   // -1.
 157   jshort _shared_class_path_index;
 158 
 159   friend class SharedClassUtil;
 160 protected:
 161 
 162   // Constructor
 163   Klass();
 164 
 165   void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, bool is_value, TRAPS) throw();
 166   void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
 167    return operator new (size, loader_data, word_size, false, THREAD);
 168   }
 169 
 170  public:
 171   enum DefaultsLookupMode { find_defaults, skip_defaults };
 172   enum OverpassLookupMode { find_overpass, skip_overpass };
 173   enum StaticLookupMode   { find_static,   skip_static };
 174   enum PrivateLookupMode  { find_private,  skip_private };
 175 
 176   bool is_klass() const volatile { return true; }
 177 
 178   // super
 179   Klass* super() const               { return _super; }
 180   void set_super(Klass* k)           { _super = k; }
 181 
 182   // initializes _super link, _primary_supers & _secondary_supers arrays
 183   void initialize_supers(Klass* k, TRAPS);
 184   void initialize_supers_impl1(Klass* k);
 185   void initialize_supers_impl2(Klass* k);
 186 
 187   // klass-specific helper for initializing _secondary_supers
 188   virtual GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots);


 675   // Verification
 676   virtual void verify_on(outputStream* st);
 677   void verify() { verify_on(tty); }
 678 
 679 #ifndef PRODUCT
 680   bool verify_vtable_index(int index);
 681   bool verify_itable_index(int index);
 682 #endif
 683 
 684   virtual void oop_verify_on(oop obj, outputStream* st);
 685 
 686   static bool is_null(narrowKlass obj);
 687   static bool is_null(Klass* obj);
 688 
 689   // klass encoding for klass pointer in objects.
 690   static narrowKlass encode_klass_not_null(Klass* v);
 691   static narrowKlass encode_klass(Klass* v);
 692 
 693   static Klass* decode_klass_not_null(narrowKlass v);
 694   static Klass* decode_klass(narrowKlass v);
 695 
 696   static bool decode_ptr_is_value_type(narrowKlass v);
 697   static bool ptr_is_value_type(Klass* v);
 698 };
 699 
 700 // Helper to convert the oop iterate macro suffixes into bool values that can be used by template functions.
 701 #define nvs_nv_to_bool true
 702 #define nvs_v_to_bool  false
 703 #define nvs_to_bool(nv_suffix) nvs##nv_suffix##_to_bool
 704 
 705 // Oop iteration macros for declarations.
 706 // Used to generate declarations in the *Klass header files.
 707 
 708 #define OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix)                                    \
 709   void oop_oop_iterate##nv_suffix(oop obj, OopClosureType* closure);                        \
 710   void oop_oop_iterate_bounded##nv_suffix(oop obj, OopClosureType* closure, MemRegion mr);
 711 
 712 #if INCLUDE_ALL_GCS
 713 #define OOP_OOP_ITERATE_DECL_BACKWARDS(OopClosureType, nv_suffix)               \
 714   void oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
 715 #endif // INCLUDE_ALL_GCS
 716 
 717 


< prev index next >