equal
deleted
inserted
replaced
1129 // jni_GetMethodID makes sure class is linked and initialized |
1129 // jni_GetMethodID makes sure class is linked and initialized |
1130 // so m should have a valid vtable index. |
1130 // so m should have a valid vtable index. |
1131 assert(m->valid_vtable_index(), "no valid vtable index"); |
1131 assert(m->valid_vtable_index(), "no valid vtable index"); |
1132 int vtbl_index = m->vtable_index(); |
1132 int vtbl_index = m->vtable_index(); |
1133 if (vtbl_index != Method::nonvirtual_vtable_index) { |
1133 if (vtbl_index != Method::nonvirtual_vtable_index) { |
1134 Klass* k = h_recv->klass(); |
1134 selected_method = h_recv->klass()->method_at_vtable(vtbl_index); |
1135 // k might be an arrayKlassOop but all vtables start at |
|
1136 // the same place. The cast is to avoid virtual call and assertion. |
|
1137 InstanceKlass *ik = (InstanceKlass*)k; |
|
1138 selected_method = ik->method_at_vtable(vtbl_index); |
|
1139 } else { |
1135 } else { |
1140 // final method |
1136 // final method |
1141 selected_method = m; |
1137 selected_method = m; |
1142 } |
1138 } |
1143 } else { |
1139 } else { |