Commit fe952ee1 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Avoid shadowing of local variables.

Cleanup fix addressing the comment on crrev.com/2325943002.

TBR=jarin@chromium.org,brucedawson@chromium.org

Review-Url: https://codereview.chromium.org/2335083002
Cr-Commit-Position: refs/heads/master@{#39364}
parent 456cf5e1
......@@ -197,7 +197,7 @@ Reduction JSInliningHeuristic::InlineCandidate(Candidate const& candidate) {
Node* calls[kMaxCallPolymorphism + 1];
Node* if_successes[kMaxCallPolymorphism];
Node* callee = NodeProperties::GetValueInput(node, 0);
Node* control = NodeProperties::GetControlInput(node);
Node* fallthrough_control = NodeProperties::GetControlInput(node);
// Setup the inputs for the cloned call nodes.
int const input_count = node->InputCount();
......@@ -212,11 +212,12 @@ Reduction JSInliningHeuristic::InlineCandidate(Candidate const& candidate) {
if (i != (num_calls - 1)) {
Node* check =
graph()->NewNode(simplified()->ReferenceEqual(), callee, target);
Node* branch = graph()->NewNode(common()->Branch(), check, control);
control = graph()->NewNode(common()->IfFalse(), branch);
Node* branch =
graph()->NewNode(common()->Branch(), check, fallthrough_control);
fallthrough_control = graph()->NewNode(common()->IfFalse(), branch);
if_successes[i] = graph()->NewNode(common()->IfTrue(), branch);
} else {
if_successes[i] = control;
if_successes[i] = fallthrough_control;
}
// The first input to the call is the actual target (which we specialize
......@@ -243,19 +244,20 @@ Reduction JSInliningHeuristic::InlineCandidate(Candidate const& candidate) {
if_exceptions[i] =
graph()->NewNode(common()->IfException(), calls[i], calls[i]);
}
Node* control =
Node* exception_control =
graph()->NewNode(common()->Merge(num_calls), num_calls, if_exceptions);
if_exceptions[num_calls] = control;
Node* effect = graph()->NewNode(common()->EffectPhi(num_calls),
num_calls + 1, if_exceptions);
Node* value = graph()->NewNode(
if_exceptions[num_calls] = exception_control;
Node* exception_effect = graph()->NewNode(common()->EffectPhi(num_calls),
num_calls + 1, if_exceptions);
Node* exception_value = graph()->NewNode(
common()->Phi(MachineRepresentation::kTagged, num_calls), num_calls + 1,
if_exceptions);
ReplaceWithValue(if_exception, value, effect, control);
ReplaceWithValue(if_exception, exception_value, exception_effect,
exception_control);
}
// Morph the call site into the dispatched call sites.
control =
Node* control =
graph()->NewNode(common()->Merge(num_calls), num_calls, if_successes);
calls[num_calls] = control;
Node* effect =
......
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