src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/library_call.cpp Mon Aug 19 07:39:09 2013
--- new/src/share/vm/opto/library_call.cpp Mon Aug 19 07:39:09 2013
*** 3681,3690 ****
--- 3681,3692 ----
// Helper for hashCode and clone. Peeks inside the vtable to avoid a call.
Node* LibraryCallKit::generate_virtual_guard(Node* obj_klass,
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 +
vtableEntry::method_offset_in_bytes();
Node* entry_addr = basic_plus_adr(obj_klass, entry_offset);
*** 3731,3740 ****
--- 3733,3744 ----
} else {
// hashCode and clone are not a miranda methods,
// 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(),
method, vtable_index, bci());
} else { // neither virtual nor static: opt_virtual
src/share/vm/opto/library_call.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File