3221 if (bc == Bytecodes::_illegal) { |
3221 if (bc == Bytecodes::_illegal) { |
3222 bc = code(); |
3222 bc = code(); |
3223 } |
3223 } |
3224 if (try_inline_full(callee, holder_known, bc, receiver)) |
3224 if (try_inline_full(callee, holder_known, bc, receiver)) |
3225 return true; |
3225 return true; |
3226 print_inlining(callee, _inline_bailout_msg, /*success*/ false); |
3226 |
|
3227 // Entire compilation could fail during try_inline_full call. |
|
3228 // In that case printing inlining decision info is useless. |
|
3229 if (!bailed_out()) |
|
3230 print_inlining(callee, _inline_bailout_msg, /*success*/ false); |
|
3231 |
3227 return false; |
3232 return false; |
3228 } |
3233 } |
3229 |
3234 |
3230 |
3235 |
3231 const char* GraphBuilder::check_can_parse(ciMethod* callee) const { |
3236 const char* GraphBuilder::check_can_parse(ciMethod* callee) const { |
3751 |
3756 |
3752 // Push callee scope |
3757 // Push callee scope |
3753 push_scope(callee, cont); |
3758 push_scope(callee, cont); |
3754 |
3759 |
3755 // the BlockListBuilder for the callee could have bailed out |
3760 // the BlockListBuilder for the callee could have bailed out |
3756 CHECK_BAILOUT_(false); |
3761 if (bailed_out()) |
|
3762 return false; |
3757 |
3763 |
3758 // Temporarily set up bytecode stream so we can append instructions |
3764 // Temporarily set up bytecode stream so we can append instructions |
3759 // (only using the bci of this stream) |
3765 // (only using the bci of this stream) |
3760 scope_data()->set_stream(scope_data()->parent()->stream()); |
3766 scope_data()->set_stream(scope_data()->parent()->stream()); |
3761 |
3767 |
3817 // Ready to resume parsing in callee (either in the same block we |
3823 // Ready to resume parsing in callee (either in the same block we |
3818 // were in before or in the callee's start block) |
3824 // were in before or in the callee's start block) |
3819 iterate_all_blocks(callee_start_block == NULL); |
3825 iterate_all_blocks(callee_start_block == NULL); |
3820 |
3826 |
3821 // If we bailed out during parsing, return immediately (this is bad news) |
3827 // If we bailed out during parsing, return immediately (this is bad news) |
3822 if (bailed_out()) return false; |
3828 if (bailed_out()) |
|
3829 return false; |
3823 |
3830 |
3824 // iterate_all_blocks theoretically traverses in random order; in |
3831 // iterate_all_blocks theoretically traverses in random order; in |
3825 // practice, we have only traversed the continuation if we are |
3832 // practice, we have only traversed the continuation if we are |
3826 // inlining into a subroutine |
3833 // inlining into a subroutine |
3827 assert(continuation_existed || |
3834 assert(continuation_existed || |
3828 !continuation()->is_set(BlockBegin::was_visited_flag), |
3835 !continuation()->is_set(BlockBegin::was_visited_flag), |
3829 "continuation should not have been parsed yet if we created it"); |
3836 "continuation should not have been parsed yet if we created it"); |
3830 |
|
3831 // If we bailed out during parsing, return immediately (this is bad news) |
|
3832 CHECK_BAILOUT_(false); |
|
3833 |
3837 |
3834 // At this point we are almost ready to return and resume parsing of |
3838 // At this point we are almost ready to return and resume parsing of |
3835 // the caller back in the GraphBuilder. The only thing we want to do |
3839 // the caller back in the GraphBuilder. The only thing we want to do |
3836 // first is an optimization: during parsing of the callee we |
3840 // first is an optimization: during parsing of the callee we |
3837 // generated at least one Goto to the continuation block. If we |
3841 // generated at least one Goto to the continuation block. If we |
4169 if (msg != NULL) |
4173 if (msg != NULL) |
4170 log->inline_success(msg); |
4174 log->inline_success(msg); |
4171 else |
4175 else |
4172 log->inline_success("receiver is statically known"); |
4176 log->inline_success("receiver is statically known"); |
4173 } else { |
4177 } else { |
4174 log->inline_fail(msg); |
4178 if (msg != NULL) |
|
4179 log->inline_fail(msg); |
|
4180 else |
|
4181 log->inline_fail("reason unknown"); |
4175 } |
4182 } |
4176 } |
4183 } |
4177 |
4184 |
4178 if (!PrintInlining) return; |
4185 if (!PrintInlining) return; |
4179 CompileTask::print_inlining(callee, scope()->level(), bci(), msg); |
4186 CompileTask::print_inlining(callee, scope()->level(), bci(), msg); |