hotspot/src/share/vm/oops/instanceKlass.hpp
changeset 35871 607bf949dfb3
parent 35847 990c61a50f24
child 35877 a2a62511d0f8
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Thu Jan 28 07:11:45 2016 +0100
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Wed Jan 27 14:50:56 2016 +0100
@@ -949,10 +949,10 @@
   virtual void collect_statistics(KlassSizeStats *sz) const;
 #endif
 
-  static int vtable_start_offset()    { return header_size(); }
-  static int vtable_length_offset()   { return offset_of(InstanceKlass, _vtable_len) / HeapWordSize; }
+  static ByteSize vtable_start_offset()    { return in_ByteSize(header_size() * wordSize); }
+  static ByteSize vtable_length_offset()   { return byte_offset_of(InstanceKlass, _vtable_len); }
 
-  intptr_t* start_of_vtable() const        { return ((intptr_t*)this) + vtable_start_offset(); }
+  intptr_t* start_of_vtable() const        { return (intptr_t*) ((address)this + in_bytes(vtable_start_offset())); }
   intptr_t* start_of_itable() const        { return start_of_vtable() + vtable_length(); }
   int  itable_offset_in_words() const { return start_of_itable() - (intptr_t*)this; }