mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8014013: CallInfo structure no longer accurately reports the result of a LinkResolver operation
Enhance method resolution and resulting data structures, plus some refactoring. Reviewed-by: twisti, acorn, jrose
This commit is contained in:
parent
98d8f57603
commit
222c735458
40 changed files with 715 additions and 601 deletions
|
@ -674,13 +674,23 @@ void Klass::oop_verify_on(oop obj, outputStream* st) {
|
|||
|
||||
#ifndef PRODUCT
|
||||
|
||||
void Klass::verify_vtable_index(int i) {
|
||||
bool Klass::verify_vtable_index(int i) {
|
||||
if (oop_is_instance()) {
|
||||
assert(i>=0 && i<((InstanceKlass*)this)->vtable_length()/vtableEntry::size(), "index out of bounds");
|
||||
int limit = ((InstanceKlass*)this)->vtable_length()/vtableEntry::size();
|
||||
assert(i >= 0 && i < limit, err_msg("index %d out of bounds %d", i, limit));
|
||||
} else {
|
||||
assert(oop_is_array(), "Must be");
|
||||
assert(i>=0 && i<((ArrayKlass*)this)->vtable_length()/vtableEntry::size(), "index out of bounds");
|
||||
int limit = ((ArrayKlass*)this)->vtable_length()/vtableEntry::size();
|
||||
assert(i >= 0 && i < limit, err_msg("index %d out of bounds %d", i, limit));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Klass::verify_itable_index(int i) {
|
||||
assert(oop_is_instance(), "");
|
||||
int method_count = klassItable::method_count_for_interface(this);
|
||||
assert(i >= 0 && i < method_count, "index out of bounds");
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue