src/share/vm/c1/c1_GraphBuilder.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8000821 Cdiff src/share/vm/c1/c1_GraphBuilder.cpp

src/share/vm/c1/c1_GraphBuilder.cpp

Print this page

        

*** 1842,1862 **** if (code == Bytecodes::_invokestatic || code == Bytecodes::_invokespecial || code == Bytecodes::_invokevirtual && target->is_final_method() || code == Bytecodes::_invokedynamic) { ciMethod* inline_target = (cha_monomorphic_target != NULL) ? cha_monomorphic_target : target; - bool success = false; - if (target->is_method_handle_intrinsic()) { - // method handle invokes - success = try_method_handle_inline(target); - } else { // static binding => check if callee is ok ! success = try_inline(inline_target, (cha_monomorphic_target != NULL) || (exact_target != NULL), code, better_receiver); ! } ! CHECK_BAILOUT(); clear_inline_bailout(); if (success) { // Register dependence if JVMTI has either breakpoint // setting or hotswapping of methods capabilities since they may // cause deoptimization. if (compilation()->env()->jvmti_can_hotswap_or_post_breakpoint()) { --- 1842,1857 ---- if (code == Bytecodes::_invokestatic || code == Bytecodes::_invokespecial || code == Bytecodes::_invokevirtual && target->is_final_method() || code == Bytecodes::_invokedynamic) { ciMethod* inline_target = (cha_monomorphic_target != NULL) ? cha_monomorphic_target : target; // static binding => check if callee is ok ! bool success = try_inline(inline_target, (cha_monomorphic_target != NULL) || (exact_target != NULL), code, better_receiver); + CHECK_BAILOUT(); clear_inline_bailout(); + if (success) { // Register dependence if JVMTI has either breakpoint // setting or hotswapping of methods capabilities since they may // cause deoptimization. if (compilation()->env()->jvmti_can_hotswap_or_post_breakpoint()) {
*** 3199,3208 **** --- 3194,3208 ---- if (msg != NULL) { print_inlining(callee, msg, /*success*/ false); return false; } + // method handle invokes + if (callee->is_method_handle_intrinsic()) { + return try_method_handle_inline(callee); + } + // handle intrinsics if (callee->intrinsic_id() != vmIntrinsics::_none) { if (try_inline_intrinsics(callee)) { print_inlining(callee, "intrinsic"); return true;
*** 3883,3898 **** // get MethodHandle receiver const int args_base = state()->stack_size() - callee->arg_size(); ValueType* type = state()->stack_at(args_base)->type(); if (type->is_constant()) { ciMethod* target = type->as_ObjectType()->constant_value()->as_method_handle()->get_vmtarget(); ! guarantee(!target->is_method_handle_intrinsic(), "should not happen"); // XXX remove Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual; if (try_inline(target, /*holder_known*/ true, bc)) { return true; } } else { print_inlining(callee, "receiver not constant", /*success*/ false); } } break; --- 3883,3902 ---- // get MethodHandle receiver const int args_base = state()->stack_size() - callee->arg_size(); ValueType* type = state()->stack_at(args_base)->type(); if (type->is_constant()) { ciMethod* target = type->as_ObjectType()->constant_value()->as_method_handle()->get_vmtarget(); ! // We don't do CHA here so only inline static and statically bindable methods. ! if (target->is_static() || target->can_be_statically_bound()) { Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual; if (try_inline(target, /*holder_known*/ true, bc)) { return true; } } else { + print_inlining(target, "not static or statically bindable", /*success*/ false); + } + } else { print_inlining(callee, "receiver not constant", /*success*/ false); } } break;
*** 3939,3952 **** --- 3943,3961 ---- state()->stack_at_put(args_base + receiver_skip + j, c); } } j += t->size(); // long and double take two slots } + // We don't do CHA here so only inline static and statically bindable methods. + if (target->is_static() || target->can_be_statically_bound()) { Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual; if (try_inline(target, /*holder_known*/ true, bc)) { return true; } + } else { + print_inlining(target, "not static or statically bindable", /*success*/ false); + } } } else { print_inlining(callee, "MemberName not constant", /*success*/ false); } }
src/share/vm/c1/c1_GraphBuilder.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File