src/share/vm/opto/callGenerator.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/callGenerator.cpp
src/share/vm/opto/callGenerator.cpp
Print this page
*** 135,144 ****
--- 135,145 ----
if (kit.C->log() != NULL) {
kit.C->log()->elem("direct_call bci='%d'", jvms->bci());
}
CallStaticJavaNode *call = new CallStaticJavaNode(kit.C, tf(), target, method(), kit.bci());
+ call->set_override_symbolic_info(override_symbolic_info());
_call_node = call; // Save the call node in case we need it later
if (!is_static) {
// Make an explicit receiver null_check as part of this call.
// Since we share a map with the caller, his JVMS gets adjusted.
kit.null_check_receiver_before_call(method());
*** 190,200 ****
// by attempting to call through it. The compile will proceed
// correctly, but may bail out in final_graph_reshaping, because
// the call instruction will have a seemingly deficient out-count.
// (The bailout says something misleading about an "infinite loop".)
if (kit.gvn().type(receiver)->higher_equal(TypePtr::NULL_PTR)) {
! kit.inc_sp(method()->arg_size()); // restore arguments
kit.uncommon_trap(Deoptimization::Reason_null_check,
Deoptimization::Action_none,
NULL, "null receiver");
return kit.transfer_exceptions_into_jvms();
}
--- 191,204 ----
// by attempting to call through it. The compile will proceed
// correctly, but may bail out in final_graph_reshaping, because
// the call instruction will have a seemingly deficient out-count.
// (The bailout says something misleading about an "infinite loop".)
if (kit.gvn().type(receiver)->higher_equal(TypePtr::NULL_PTR)) {
! assert(Bytecodes::is_invoke(kit.java_bc()), "%d: %s", kit.java_bc(), Bytecodes::name(kit.java_bc()));
! ciMethod* declared_method = kit.method()->get_method_at_bci(kit.bci());
! int arg_size = declared_method->signature()->arg_size_for_bc(kit.java_bc());
! kit.inc_sp(arg_size); // restore arguments
kit.uncommon_trap(Deoptimization::Reason_null_check,
Deoptimization::Action_none,
NULL, "null receiver");
return kit.transfer_exceptions_into_jvms();
}
*** 224,233 ****
--- 228,238 ----
assert(_vtable_index == Method::invalid_vtable_index || !UseInlineCaches,
"no vtable calls if +UseInlineCaches ");
address target = SharedRuntime::get_resolve_virtual_call_stub();
// Normal inline cache used for call
CallDynamicJavaNode *call = new CallDynamicJavaNode(tf(), target, method(), _vtable_index, kit.bci());
+ call->set_override_symbolic_info(override_symbolic_info());
kit.set_arguments_for_java_call(call);
kit.set_edges_for_java_call(call);
Node* ret = kit.set_results_for_java_call(call);
kit.push_node(method()->return_type()->basic_type(), ret);
*** 461,472 ****
if (!_input_not_const) {
_attempt++;
}
! if (cg != NULL) {
! assert(!cg->is_late_inline() && cg->is_inline(), "we're doing late inlining");
_inline_cg = cg;
Compile::current()->dec_number_of_mh_late_inlines();
return true;
}
--- 466,477 ----
if (!_input_not_const) {
_attempt++;
}
! if (cg != NULL && cg->is_inline()) {
! assert(!cg->is_late_inline(), "we're doing late inlining");
_inline_cg = cg;
Compile::current()->dec_number_of_mh_late_inlines();
return true;
}
*** 805,816 ****
ciMethod* target = oop_ptr->const_oop()->as_method_handle()->get_vmtarget();
guarantee(!target->is_method_handle_intrinsic(), "should not happen"); // XXX remove
const int vtable_index = Method::invalid_vtable_index;
CallGenerator* cg = C->call_generator(target, vtable_index, false, jvms, true, PROB_ALWAYS, NULL, true, true);
assert(cg == NULL || !cg->is_late_inline() || cg->is_mh_late_inline(), "no late inline here");
! if (cg != NULL && cg->is_inline())
return cg;
} else {
const char* msg = "receiver not constant";
if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
C->log_inline_failure(msg);
}
--- 810,828 ----
ciMethod* target = oop_ptr->const_oop()->as_method_handle()->get_vmtarget();
guarantee(!target->is_method_handle_intrinsic(), "should not happen"); // XXX remove
const int vtable_index = Method::invalid_vtable_index;
CallGenerator* cg = C->call_generator(target, vtable_index, false, jvms, true, PROB_ALWAYS, NULL, true, true);
assert(cg == NULL || !cg->is_late_inline() || cg->is_mh_late_inline(), "no late inline here");
! if (cg != NULL) {
! if (!cg->is_inline()) {
! // To be able to issue a static call (and skip a call to MH.invokeBasic adapter),
! // additional information about the method being invoked should be attached
! // to the call site to make resolution logic work (see SharedRuntime::resolve_static_call_C).
! cg->set_override_symbolic_info(true);
! }
return cg;
+ }
} else {
const char* msg = "receiver not constant";
if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
C->log_inline_failure(msg);
}
*** 827,837 ****
if (member_name->Opcode() == Op_ConP) {
input_not_const = false;
const TypeOopPtr* oop_ptr = member_name->bottom_type()->is_oopptr();
ciMethod* target = oop_ptr->const_oop()->as_member_name()->get_vmtarget();
! // In lamda forms we erase signature types to avoid resolving issues
// involving class loaders. When we optimize a method handle invoke
// to a direct call we must cast the receiver and arguments to its
// actual types.
ciSignature* signature = target->signature();
const int receiver_skip = target->is_static() ? 0 : 1;
--- 839,849 ----
if (member_name->Opcode() == Op_ConP) {
input_not_const = false;
const TypeOopPtr* oop_ptr = member_name->bottom_type()->is_oopptr();
ciMethod* target = oop_ptr->const_oop()->as_member_name()->get_vmtarget();
! // In lambda forms we erase signature types to avoid resolving issues
// involving class loaders. When we optimize a method handle invoke
// to a direct call we must cast the receiver and arguments to its
// actual types.
ciSignature* signature = target->signature();
const int receiver_skip = target->is_static() ? 0 : 1;
*** 880,893 ****
/*check_access=*/false);
// We lack profiling at this call but type speculation may
// provide us with a type
speculative_receiver_type = (receiver_type != NULL) ? receiver_type->speculative_type() : NULL;
}
! CallGenerator* cg = C->call_generator(target, vtable_index, call_does_dispatch, jvms, true, PROB_ALWAYS, speculative_receiver_type, true, true);
assert(cg == NULL || !cg->is_late_inline() || cg->is_mh_late_inline(), "no late inline here");
! if (cg != NULL && cg->is_inline())
return cg;
} else {
const char* msg = "member_name not constant";
if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
C->log_inline_failure(msg);
}
--- 892,913 ----
/*check_access=*/false);
// We lack profiling at this call but type speculation may
// provide us with a type
speculative_receiver_type = (receiver_type != NULL) ? receiver_type->speculative_type() : NULL;
}
! CallGenerator* cg = C->call_generator(target, vtable_index, call_does_dispatch, jvms, /*allow_inline=*/true, PROB_ALWAYS, speculative_receiver_type, true, true);
assert(cg == NULL || !cg->is_late_inline() || cg->is_mh_late_inline(), "no late inline here");
! if (cg != NULL) {
! if (!cg->is_inline()) {
! // To be able to issue a direct call (static, optimized virtual, or virtual)
! // and skip a call to MH.linkTo* adapter, additional information about the method
! // being invoked should be attached to the call site to make resolution logic work
! // (see SharedRuntime::resolve_{static,virtual,opt_virtual}_call_C).
! cg->set_override_symbolic_info(true);
! }
return cg;
+ }
} else {
const char* msg = "member_name not constant";
if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg);
C->log_inline_failure(msg);
}
src/share/vm/opto/callGenerator.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File