mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files. Reviewed-by: dholmes, coleenp, zgu
This commit is contained in:
parent
e1d995ab86
commit
7fee66f152
39 changed files with 176 additions and 179 deletions
|
@ -446,7 +446,7 @@ void ErrorContext::location_details(outputStream* ss, Method* method) const {
|
|||
bytecode_name = "<illegal>";
|
||||
}
|
||||
}
|
||||
InstanceKlass* ik = InstanceKlass::cast(method->method_holder());
|
||||
InstanceKlass* ik = method->method_holder();
|
||||
ss->indent().print_cr("Location:");
|
||||
streamIndentor si2(ss);
|
||||
ss->indent().print_cr("%s.%s%s @%d: %s",
|
||||
|
@ -1850,7 +1850,7 @@ void ClassVerifier::verify_cp_index(
|
|||
if ((index <= 0) || (index >= nconstants)) {
|
||||
verify_error(ErrorContext::bad_cp_index(bci, index),
|
||||
"Illegal constant pool index %d in class %s",
|
||||
index, InstanceKlass::cast(cp->pool_holder())->external_name());
|
||||
index, cp->pool_holder()->external_name());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1869,7 +1869,7 @@ void ClassVerifier::verify_cp_type(
|
|||
if ((types & (1 << tag)) == 0) {
|
||||
verify_error(ErrorContext::bad_cp_index(bci, index),
|
||||
"Illegal type at constant pool entry %d in class %s",
|
||||
index, InstanceKlass::cast(cp->pool_holder())->external_name());
|
||||
index, cp->pool_holder()->external_name());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1881,7 +1881,7 @@ void ClassVerifier::verify_cp_class_type(
|
|||
if (!tag.is_klass() && !tag.is_unresolved_klass()) {
|
||||
verify_error(ErrorContext::bad_cp_index(bci, index),
|
||||
"Illegal type at constant pool entry %d in class %s",
|
||||
index, InstanceKlass::cast(cp->pool_holder())->external_name());
|
||||
index, cp->pool_holder()->external_name());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue