diff src/share/vm/opto/library_call.cpp @ 12269:da051ce490eb

Merge
author adlertz
date Thu, 19 Sep 2013 18:01:39 +0200
parents 884ed7a10f09 b2e698d2276c
children 1b64d46620a3
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp	Thu Sep 19 09:34:20 2013 +0200
+++ b/src/share/vm/opto/library_call.cpp	Thu Sep 19 18:01:39 2013 +0200
@@ -3734,6 +3734,8 @@
                                              RegionNode* slow_region) {
   ciMethod* method = callee();
   int vtable_index = method->vtable_index();
+  assert(vtable_index >= 0 || vtable_index == Method::nonvirtual_vtable_index,
+         err_msg_res("bad index %d", vtable_index));
   // Get the Method* out of the appropriate vtable entry.
   int entry_offset  = (InstanceKlass::vtable_start_offset() +
                      vtable_index*vtableEntry::size()) * wordSize +
@@ -3784,6 +3786,8 @@
       // so the vtable index is fixed.
       // No need to use the linkResolver to get it.
        vtable_index = method->vtable_index();
+       assert(vtable_index >= 0 || vtable_index == Method::nonvirtual_vtable_index,
+              err_msg_res("bad index %d", vtable_index));
     }
     slow_call = new(C) CallDynamicJavaNode(tf,
                           SharedRuntime::get_resolve_virtual_call_stub(),