--- a/hotspot/src/share/vm/prims/jni.cpp Thu Sep 19 09:34:20 2013 +0200
+++ b/hotspot/src/share/vm/prims/jni.cpp Thu Sep 19 18:01:39 2013 +0200
@@ -1336,6 +1336,7 @@
if (call_type == JNI_VIRTUAL) {
// jni_GetMethodID makes sure class is linked and initialized
// so m should have a valid vtable index.
+ assert(!m->has_itable_index(), "");
int vtbl_index = m->vtable_index();
if (vtbl_index != Method::nonvirtual_vtable_index) {
Klass* k = h_recv->klass();
@@ -1355,12 +1356,7 @@
// interface call
KlassHandle h_holder(THREAD, holder);
- int itbl_index = m->cached_itable_index();
- if (itbl_index == -1) {
- itbl_index = klassItable::compute_itable_index(m);
- m->set_cached_itable_index(itbl_index);
- // the above may have grabbed a lock, 'm' and anything non-handlized can't be used again
- }
+ int itbl_index = m->itable_index();
Klass* k = h_recv->klass();
selected_method = InstanceKlass::cast(k)->method_at_itable(h_holder(), itbl_index, CHECK);
}