hotspot/src/share/vm/oops/klass.cpp
changeset 35900 d64cf9290fc4
parent 35899 0dbc821628fc
child 35913 928548a43408
child 35917 463d67f86eaa
equal deleted inserted replaced
35899:0dbc821628fc 35900:d64cf9290fc4
   657 void Klass::oop_verify_on(oop obj, outputStream* st) {
   657 void Klass::oop_verify_on(oop obj, outputStream* st) {
   658   guarantee(obj->is_oop(),  "should be oop");
   658   guarantee(obj->is_oop(),  "should be oop");
   659   guarantee(obj->klass()->is_klass(), "klass field is not a klass");
   659   guarantee(obj->klass()->is_klass(), "klass field is not a klass");
   660 }
   660 }
   661 
   661 
       
   662 klassVtable* Klass::vtable() const {
       
   663   return new klassVtable(this, start_of_vtable(), vtable_length() / vtableEntry::size());
       
   664 }
       
   665 
       
   666 vtableEntry* Klass::start_of_vtable() const {
       
   667   return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
       
   668 }
       
   669 
       
   670 Method* Klass::method_at_vtable(int index)  {
       
   671 #ifndef PRODUCT
       
   672   assert(index >= 0, "valid vtable index");
       
   673   if (DebugVtables) {
       
   674     verify_vtable_index(index);
       
   675   }
       
   676 #endif
       
   677   return start_of_vtable()[index].method();
       
   678 }
       
   679 
   662 ByteSize Klass::vtable_start_offset() {
   680 ByteSize Klass::vtable_start_offset() {
   663   return in_ByteSize(InstanceKlass::header_size() * wordSize);
   681   return in_ByteSize(InstanceKlass::header_size() * wordSize);
   664 }
   682 }
   665 
   683 
   666 #ifndef PRODUCT
   684 #ifndef PRODUCT