diff src/share/vm/prims/jni.cpp @ 12264:b2e698d2276c

8014013: CallInfo structure no longer accurately reports the result of a LinkResolver operation Summary: Enhance method resolution and resulting data structures, plus some refactoring. Reviewed-by: twisti, acorn, jrose
author drchase
date Fri, 13 Sep 2013 22:38:02 -0400
parents 21ffbaa691b5
children da051ce490eb
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp	Tue Sep 17 23:12:27 2013 +0200
+++ b/src/share/vm/prims/jni.cpp	Fri Sep 13 22:38:02 2013 -0400
@@ -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);
     }