src/share/vm/opto/doCall.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/opto/doCall.cpp Wed Jun 18 14:51:48 2014
--- new/src/share/vm/opto/doCall.cpp Wed Jun 18 14:51:48 2014
*** 466,477 ****
--- 466,477 ----
ciKlass* speculative_receiver_type = NULL;
if (is_virtual_or_interface) {
Node* receiver_node = stack(sp() - nargs);
const TypeOopPtr* receiver_type = _gvn.type(receiver_node)->isa_oopptr();
// call_does_dispatch and vtable_index are out-parameters. They might be changed.
! callee = C->optimize_virtual_call(method(), bci(), klass, orig_callee, receiver_type,
! is_virtual,
! callee = C->optimize_virtual_call(method(), bci(), klass, holder, orig_callee,
! receiver_type, is_virtual,
call_does_dispatch, vtable_index); // out-parameters
speculative_receiver_type = receiver_type != NULL ? receiver_type->speculative_type() : NULL;
}
// Note: It's OK to try to inline a virtual call.
*** 938,949 ****
--- 938,949 ----
}
#endif //PRODUCT
ciMethod* Compile::optimize_virtual_call(ciMethod* caller, int bci, ciInstanceKlass* klass,
! ciMethod* callee, const TypeOopPtr* receiver_type,
! bool is_virtual,
! ciKlass* holder, ciMethod* callee,
! const TypeOopPtr* receiver_type, bool is_virtual,
bool& call_does_dispatch, int& vtable_index) {
// Set default values for out-parameters.
call_does_dispatch = true;
vtable_index = Method::invalid_vtable_index;
*** 954,964 ****
--- 954,964 ----
if (optimized_virtual_method != NULL) {
callee = optimized_virtual_method;
call_does_dispatch = false;
} else if (!UseInlineCaches && is_virtual && callee->is_loaded()) {
// We can make a vtable call at this site
! vtable_index = callee->resolve_vtable_index(caller->holder(), klass);
! vtable_index = callee->resolve_vtable_index(caller->holder(), holder);
}
return callee;
}
// Identify possible target method and inlining style
*** 978,988 ****
--- 978,989 ----
bool actual_receiver_is_exact = false;
ciInstanceKlass* actual_receiver = klass;
if (receiver_type != NULL) {
// Array methods are all inherited from Object, and are monomorphic.
if (receiver_type->isa_aryptr() &&
! callee->holder() == env()->Object_klass()) {
! callee->holder() == env()->Object_klass() &&
+ callee->name() != ciSymbol::finalize_method_name()) {
return callee;
}
// All other interesting cases are instance klasses.
if (!receiver_type->isa_instptr()) {
src/share/vm/opto/doCall.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File