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