Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: src/compiler/js-inlining-heuristic.cc

Issue 2335083002: [turbofan] Avoid shadowing of local variables. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining-heuristic.cc
diff --git a/src/compiler/js-inlining-heuristic.cc b/src/compiler/js-inlining-heuristic.cc
index 26c9b1d33ef082ad947f95bb8cb25679d17bbf9f..2870a8d15b6d6bb08b6e0e4abd3e3a56cf8ec616 100644
--- a/src/compiler/js-inlining-heuristic.cc
+++ b/src/compiler/js-inlining-heuristic.cc
@@ -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 =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698