Commit 74941eb5 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Move a condition for inlining into SFI's IsInlineable

Since that condition doesn't depend on anything other than the SFI,
the IsInlineable method is the right place for checking it. This also
has the benefit that the condition will get checked earlier so that we
might avoid unnecessary work.

Bug: v8:7790
Change-Id: Ie92d4b72c6c524c5e8412701b88e88c9d73fa5bd
Reviewed-on: https://chromium-review.googlesource.com/c/1470061
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59559}
parent bff96cef
......@@ -408,14 +408,6 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
return NoChange();
}
// Function contains break points.
if (shared_info->HasBreakInfo()) {
TRACE("Not inlining %s into %s because callee may contain break points\n",
shared_info->DebugName()->ToCString().get(),
info_->shared_info()->DebugName()->ToCString().get());
return NoChange();
}
// To ensure inlining always terminates, we have an upper limit on inlining
// the nested calls.
int nesting_level = 0;
......
......@@ -5241,6 +5241,11 @@ bool SharedFunctionInfo::IsInlineable() {
return false;
}
if (HasBreakInfo()) {
TraceInlining(*this, "false (may contain break points)");
return false;
}
TraceInlining(*this, "true");
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment