< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page
rev 56521 : 8232050: Improve inlining of Klass accessors
Reviewed-by: TBD


 975   // subclass/subinterface checks
 976   bool implements_interface(Klass* k) const;
 977   bool is_same_or_direct_interface(Klass* k) const;
 978 
 979 #ifdef ASSERT
 980   // check whether this class or one of its superclasses was redefined
 981   bool has_redefined_this_or_super() const;
 982 #endif
 983 
 984   // Access to the implementor of an interface.
 985   Klass* implementor() const;
 986   void set_implementor(Klass* k);
 987   int  nof_implementors() const;
 988   void add_implementor(Klass* k);  // k is a new class that implements this interface
 989   void init_implementor();           // initialize
 990 
 991   // link this class into the implementors list of every interface it implements
 992   void process_interfaces(Thread *thread);
 993 
 994   // virtual operations from Klass
 995   bool is_leaf_class() const               { return _subklass == NULL; }
 996   GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots,
 997                                                   Array<InstanceKlass*>* transitive_interfaces);
 998   bool can_be_primary_super_slow() const;
 999   int oop_size(oop obj)  const             { return size_helper(); }
1000   // slow because it's a virtual call and used for verifying the layout_helper.
1001   // Using the layout_helper bits, we can call is_instance_klass without a virtual call.
1002   DEBUG_ONLY(bool is_instance_klass_slow() const      { return true; })
1003 
1004   // Iterators
1005   void do_local_static_fields(FieldClosure* cl);
1006   void do_nonstatic_fields(FieldClosure* cl); // including inherited fields
1007   void do_local_static_fields(void f(fieldDescriptor*, Handle, TRAPS), Handle, TRAPS);
1008 
1009   void methods_do(void f(Method* method));
1010   void array_klasses_do(void f(Klass* k));
1011   void array_klasses_do(void f(Klass* k, TRAPS), TRAPS);
1012 
1013   static InstanceKlass* cast(Klass* k) {
1014     return const_cast<InstanceKlass*>(cast(const_cast<const Klass*>(k)));
1015   }




 975   // subclass/subinterface checks
 976   bool implements_interface(Klass* k) const;
 977   bool is_same_or_direct_interface(Klass* k) const;
 978 
 979 #ifdef ASSERT
 980   // check whether this class or one of its superclasses was redefined
 981   bool has_redefined_this_or_super() const;
 982 #endif
 983 
 984   // Access to the implementor of an interface.
 985   Klass* implementor() const;
 986   void set_implementor(Klass* k);
 987   int  nof_implementors() const;
 988   void add_implementor(Klass* k);  // k is a new class that implements this interface
 989   void init_implementor();           // initialize
 990 
 991   // link this class into the implementors list of every interface it implements
 992   void process_interfaces(Thread *thread);
 993 
 994   // virtual operations from Klass

 995   GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots,
 996                                                   Array<InstanceKlass*>* transitive_interfaces);
 997   bool can_be_primary_super_slow() const;
 998   int oop_size(oop obj)  const             { return size_helper(); }
 999   // slow because it's a virtual call and used for verifying the layout_helper.
1000   // Using the layout_helper bits, we can call is_instance_klass without a virtual call.
1001   DEBUG_ONLY(bool is_instance_klass_slow() const      { return true; })
1002 
1003   // Iterators
1004   void do_local_static_fields(FieldClosure* cl);
1005   void do_nonstatic_fields(FieldClosure* cl); // including inherited fields
1006   void do_local_static_fields(void f(fieldDescriptor*, Handle, TRAPS), Handle, TRAPS);
1007 
1008   void methods_do(void f(Method* method));
1009   void array_klasses_do(void f(Klass* k));
1010   void array_klasses_do(void f(Klass* k, TRAPS), TRAPS);
1011 
1012   static InstanceKlass* cast(Klass* k) {
1013     return const_cast<InstanceKlass*>(cast(const_cast<const Klass*>(k)));
1014   }


< prev index next >