mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8148481: Devirtualize Klass::vtable
Move remainder of vtable related methods to Klass Reviewed-by: cjplummer, coleenp
This commit is contained in:
parent
211dc93a85
commit
3cda485fe5
12 changed files with 44 additions and 73 deletions
|
@ -1131,11 +1131,7 @@ static void jni_invoke_nonstatic(JNIEnv *env, JavaValue* result, jobject receive
|
|||
assert(m->valid_vtable_index(), "no valid vtable index");
|
||||
int vtbl_index = m->vtable_index();
|
||||
if (vtbl_index != Method::nonvirtual_vtable_index) {
|
||||
Klass* k = h_recv->klass();
|
||||
// k might be an arrayKlassOop but all vtables start at
|
||||
// the same place. The cast is to avoid virtual call and assertion.
|
||||
InstanceKlass *ik = (InstanceKlass*)k;
|
||||
selected_method = ik->method_at_vtable(vtbl_index);
|
||||
selected_method = h_recv->klass()->method_at_vtable(vtbl_index);
|
||||
} else {
|
||||
// final method
|
||||
selected_method = m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue