< prev index next >
src/share/vm/oops/klass.cpp
Print this page
*** 262,272 ****
}
#endif
}
if (secondary_supers() == NULL) {
- KlassHandle this_kh (THREAD, this);
// Now compute the list of secondary supertypes.
// Secondaries can occasionally be on the super chain,
// if the inline "_primary_supers" array overflows.
int extras = 0;
--- 262,271 ----
*** 284,294 ****
return;
}
GrowableArray<Klass*>* primaries = new GrowableArray<Klass*>(extras);
! for (p = this_kh->super(); !(p == NULL || p->can_be_primary_super()); p = p->super()) {
int i; // Scan for overflow primaries being duplicates of 2nd'arys
// This happens frequently for very deeply nested arrays: the
// primary superclass chain overflows into the secondary. The
// secondary list contains the element_klass's secondaries with
--- 283,293 ----
return;
}
GrowableArray<Klass*>* primaries = new GrowableArray<Klass*>(extras);
! for (p = super(); !(p == NULL || p->can_be_primary_super()); p = p->super()) {
int i; // Scan for overflow primaries being duplicates of 2nd'arys
// This happens frequently for very deeply nested arrays: the
// primary superclass chain overflows into the secondary. The
// secondary list contains the element_klass's secondaries with
*** 322,332 ****
for (int j = 0; j < s2->length(); j++) {
assert(s2->at(j) != NULL, "correct bootstrapping order");
}
#endif
! this_kh->set_secondary_supers(s2);
}
}
GrowableArray<Klass*>* Klass::compute_secondary_supers(int num_extra_slots) {
assert(num_extra_slots == 0, "override for complex klasses");
--- 321,331 ----
for (int j = 0; j < s2->length(); j++) {
assert(s2->at(j) != NULL, "correct bootstrapping order");
}
#endif
! set_secondary_supers(s2);
}
}
GrowableArray<Klass*>* Klass::compute_secondary_supers(int num_extra_slots) {
assert(num_extra_slots == 0, "override for complex klasses");
*** 695,705 ****
guarantee(obj->is_oop(), "should be oop");
guarantee(obj->klass()->is_klass(), "klass field is not a klass");
}
klassVtable* Klass::vtable() const {
! return new klassVtable(this, start_of_vtable(), vtable_length() / vtableEntry::size());
}
vtableEntry* Klass::start_of_vtable() const {
return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
}
--- 694,704 ----
guarantee(obj->is_oop(), "should be oop");
guarantee(obj->klass()->is_klass(), "klass field is not a klass");
}
klassVtable* Klass::vtable() const {
! return new klassVtable(const_cast<Klass*>(this), start_of_vtable(), vtable_length() / vtableEntry::size());
}
vtableEntry* Klass::start_of_vtable() const {
return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
}
< prev index next >