[Interpreter] Avoid shadowing variables in the bytecode graph builder.
authoroth <oth@chromium.org>
Tue, 15 Sep 2015 08:18:23 +0000 (01:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 15 Sep 2015 08:18:35 +0000 (08:18 +0000)
Reported by Bruce Dawson.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1346453002

Cr-Commit-Position: refs/heads/master@{#30732}

src/compiler/bytecode-graph-builder.cc

index 3dbc0b240b306f0172b6fdfb0e7efb9ecea3884d..10f44a677abd1c1df8301a7fe6e7ae2c346cdc76 100644 (file)
@@ -395,8 +395,8 @@ Node* BytecodeGraphBuilder::MakeNode(const Operator* op, int value_input_count,
       }
       // Add implicit success continuation for throwing nodes.
       if (!result->op()->HasProperty(Operator::kNoThrow)) {
-        const Operator* op = common()->IfSuccess();
-        Node* on_success = graph()->NewNode(op, result);
+        const Operator* if_success = common()->IfSuccess();
+        Node* on_success = graph()->NewNode(if_success, result);
         environment_->UpdateControlDependency(on_success);
       }
     }
@@ -421,8 +421,8 @@ Node* BytecodeGraphBuilder::MergeControl(Node* control, Node* other) {
   } else {
     // Control node is a singleton, introduce a merge.
     const Operator* op = common()->Merge(inputs);
-    Node* inputs[] = {control, other};
-    control = graph()->NewNode(op, arraysize(inputs), inputs, true);
+    Node* merge_inputs[] = {control, other};
+    control = graph()->NewNode(op, arraysize(merge_inputs), merge_inputs, true);
   }
   return control;
 }