< prev index next >

src/hotspot/share/oops/klassVtable.hpp

Print this page

278 //
279 class klassItable {
280  private:
281   InstanceKlass*       _klass;             // my klass
282   int                  _table_offset;      // offset of start of itable data within klass (in words)
283   int                  _size_offset_table; // size of offset table (in itableOffset entries)
284   int                  _size_method_table; // size of methodtable (in itableMethodEntry entries)
285 
286   void initialize_itable_for_interface(int method_table_offset, InstanceKlass* interf_h,
287                                        GrowableArray<Method*>* supers, int start_offset);
288   void check_constraints(GrowableArray<Method*>* supers, TRAPS);
289  public:
290   klassItable(InstanceKlass* klass);
291 
292   itableOffsetEntry* offset_entry(int i) { assert(0 <= i && i <= _size_offset_table, "index out of bounds");
293                                            return &((itableOffsetEntry*)vtable_start())[i]; }
294 
295   itableMethodEntry* method_entry(int i) { assert(0 <= i && i <= _size_method_table, "index out of bounds");
296                                            return &((itableMethodEntry*)method_start())[i]; }
297 
298   int size_offset_table()                { return _size_offset_table; }



299 
300   // Initialization
301   void initialize_itable_and_check_constraints(TRAPS);
302   void initialize_itable(GrowableArray<Method*>* supers = NULL);
303 
304 #if INCLUDE_JVMTI
305   // RedefineClasses() API support:
306   // if any entry of this itable points to any of old_methods,
307   // replace it with the corresponding new_method.
308   // trace_name_printed is set to true if the current call has
309   // printed the klass name so that other routines in the adjust_*
310   // group don't print the klass name.
311   void adjust_method_entries(bool* trace_name_printed);
312   bool check_no_old_or_obsolete_entries();
313   void dump_itable();
314 #endif // INCLUDE_JVMTI
315 
316   // Setup of itable
317   static int assign_itable_indices_for_interface(InstanceKlass* klass);
318   static int method_count_for_interface(InstanceKlass* klass);

278 //
279 class klassItable {
280  private:
281   InstanceKlass*       _klass;             // my klass
282   int                  _table_offset;      // offset of start of itable data within klass (in words)
283   int                  _size_offset_table; // size of offset table (in itableOffset entries)
284   int                  _size_method_table; // size of methodtable (in itableMethodEntry entries)
285 
286   void initialize_itable_for_interface(int method_table_offset, InstanceKlass* interf_h,
287                                        GrowableArray<Method*>* supers, int start_offset);
288   void check_constraints(GrowableArray<Method*>* supers, TRAPS);
289  public:
290   klassItable(InstanceKlass* klass);
291 
292   itableOffsetEntry* offset_entry(int i) { assert(0 <= i && i <= _size_offset_table, "index out of bounds");
293                                            return &((itableOffsetEntry*)vtable_start())[i]; }
294 
295   itableMethodEntry* method_entry(int i) { assert(0 <= i && i <= _size_method_table, "index out of bounds");
296                                            return &((itableMethodEntry*)method_start())[i]; }
297 
298   InstanceKlass* klass() const          { return _klass; }
299   int table_offset() const              { return _table_offset; }
300   int size_offset_table() const         { return _size_offset_table; }
301   int size_method_table() const         { return _size_method_table; }
302 
303   // Initialization
304   void initialize_itable_and_check_constraints(TRAPS);
305   void initialize_itable(GrowableArray<Method*>* supers = NULL);
306 
307 #if INCLUDE_JVMTI
308   // RedefineClasses() API support:
309   // if any entry of this itable points to any of old_methods,
310   // replace it with the corresponding new_method.
311   // trace_name_printed is set to true if the current call has
312   // printed the klass name so that other routines in the adjust_*
313   // group don't print the klass name.
314   void adjust_method_entries(bool* trace_name_printed);
315   bool check_no_old_or_obsolete_entries();
316   void dump_itable();
317 #endif // INCLUDE_JVMTI
318 
319   // Setup of itable
320   static int assign_itable_indices_for_interface(InstanceKlass* klass);
321   static int method_count_for_interface(InstanceKlass* klass);
< prev index next >