src/share/vm/oops/instanceKlass.hpp
Print this page
@@ -924,21 +924,19 @@
InstanceKlass* java_super() const {
return (super() == NULL) ? NULL : cast(super());
}
// Sizing (in words)
- static int header_size() { return align_object_offset(sizeof(InstanceKlass)/HeapWordSize); }
+ static int header_size() { return sizeof(InstanceKlass)/HeapWordSize; }
static int size(int vtable_length, int itable_length,
int nonstatic_oop_map_size,
bool is_interface, bool is_anonymous) {
return align_object_size(header_size() +
- align_object_offset(vtable_length) +
- align_object_offset(itable_length) +
- ((is_interface || is_anonymous) ?
- align_object_offset(nonstatic_oop_map_size) :
- nonstatic_oop_map_size) +
+ vtable_length +
+ itable_length +
+ nonstatic_oop_map_size +
(is_interface ? (int)sizeof(Klass*)/HeapWordSize : 0) +
(is_anonymous ? (int)sizeof(Klass*)/HeapWordSize : 0));
}
int size() const { return size(vtable_length(),
itable_length(),
@@ -952,19 +950,19 @@
static int vtable_start_offset() { return header_size(); }
static int vtable_length_offset() { return offset_of(InstanceKlass, _vtable_len) / HeapWordSize; }
intptr_t* start_of_vtable() const { return ((intptr_t*)this) + vtable_start_offset(); }
- intptr_t* start_of_itable() const { return start_of_vtable() + align_object_offset(vtable_length()); }
+ 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; }
intptr_t* end_of_itable() const { return start_of_itable() + itable_length(); }
address static_field_addr(int offset);
OopMapBlock* start_of_nonstatic_oop_maps() const {
- return (OopMapBlock*)(start_of_itable() + align_object_offset(itable_length()));
+ return (OopMapBlock*)(start_of_itable() + itable_length());
}
Klass** end_of_nonstatic_oop_maps() const {
return (Klass**)(start_of_nonstatic_oop_maps() +
nonstatic_oop_map_count());