Commit 31a920af authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[compiler] Fix some -Wshadow warnings

Bug: v8:12244,v8:12245
Change-Id: Ic63e06543e53d63ba4b58a864b46163abcddf82f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3213350Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77321}
parent a881300a
...@@ -3977,8 +3977,8 @@ Node* EffectControlLinearizer::LowerStringCharCodeAt(Node* node) { ...@@ -3977,8 +3977,8 @@ Node* EffectControlLinearizer::LowerStringCharCodeAt(Node* node) {
__ Goto(&loop, receiver, position); __ Goto(&loop, receiver, position);
__ Bind(&loop); __ Bind(&loop);
{ {
Node* receiver = loop.PhiAt(0); receiver = loop.PhiAt(0);
Node* position = loop.PhiAt(1); position = loop.PhiAt(1);
Node* receiver_map = __ LoadField(AccessBuilder::ForMap(), receiver); Node* receiver_map = __ LoadField(AccessBuilder::ForMap(), receiver);
Node* receiver_instance_type = Node* receiver_instance_type =
__ LoadField(AccessBuilder::ForMapInstanceType(), receiver_map); __ LoadField(AccessBuilder::ForMapInstanceType(), receiver_map);
......
...@@ -75,7 +75,7 @@ void GraphReducer::ReduceNode(Node* node) { ...@@ -75,7 +75,7 @@ void GraphReducer::ReduceNode(Node* node) {
ReduceTop(); ReduceTop();
} else if (!revisit_.empty()) { } else if (!revisit_.empty()) {
// If the stack becomes empty, revisit any nodes in the revisit queue. // If the stack becomes empty, revisit any nodes in the revisit queue.
Node* const node = revisit_.front(); node = revisit_.front();
revisit_.pop(); revisit_.pop();
if (state_.Get(node) == State::kRevisit) { if (state_.Get(node) == State::kRevisit) {
// state can change while in queue. // state can change while in queue.
...@@ -189,7 +189,7 @@ void GraphReducer::ReduceTop() { ...@@ -189,7 +189,7 @@ void GraphReducer::ReduceTop() {
} }
// In-place update of {node}, may need to recurse on an input. // In-place update of {node}, may need to recurse on an input.
Node::Inputs node_inputs = node->inputs(); node_inputs = node->inputs();
for (int i = 0; i < node_inputs.count(); ++i) { for (int i = 0; i < node_inputs.count(); ++i) {
Node* input = node_inputs[i]; Node* input = node_inputs[i];
if (input != node && Recurse(input)) { if (input != node && Recurse(input)) {
......
...@@ -633,21 +633,21 @@ void GraphC1Visualizer::PrintSchedule(const char* phase, ...@@ -633,21 +633,21 @@ void GraphC1Visualizer::PrintSchedule(const char* phase,
Tag states_tag(this, "states"); Tag states_tag(this, "states");
Tag locals_tag(this, "locals"); Tag locals_tag(this, "locals");
int total = 0; int total = 0;
for (BasicBlock::const_iterator i = current->begin(); i != current->end(); for (BasicBlock::const_iterator it = current->begin();
++i) { it != current->end(); ++it) {
if ((*i)->opcode() == IrOpcode::kPhi) total++; if ((*it)->opcode() == IrOpcode::kPhi) total++;
} }
PrintIntProperty("size", total); PrintIntProperty("size", total);
PrintStringProperty("method", "None"); PrintStringProperty("method", "None");
int index = 0; int index = 0;
for (BasicBlock::const_iterator i = current->begin(); i != current->end(); for (BasicBlock::const_iterator it = current->begin();
++i) { it != current->end(); ++it) {
if ((*i)->opcode() != IrOpcode::kPhi) continue; if ((*it)->opcode() != IrOpcode::kPhi) continue;
PrintIndent(); PrintIndent();
os_ << index << " "; os_ << index << " ";
PrintNodeId(*i); PrintNodeId(*it);
os_ << " ["; os_ << " [";
PrintInputs(*i); PrintInputs(*it);
os_ << "]\n"; os_ << "]\n";
index++; index++;
} }
...@@ -655,9 +655,9 @@ void GraphC1Visualizer::PrintSchedule(const char* phase, ...@@ -655,9 +655,9 @@ void GraphC1Visualizer::PrintSchedule(const char* phase,
{ {
Tag HIR_tag(this, "HIR"); Tag HIR_tag(this, "HIR");
for (BasicBlock::const_iterator i = current->begin(); i != current->end(); for (BasicBlock::const_iterator it = current->begin();
++i) { it != current->end(); ++it) {
Node* node = *i; Node* node = *it;
if (node->opcode() == IrOpcode::kPhi) continue; if (node->opcode() == IrOpcode::kPhi) continue;
int uses = node->UseCount(); int uses = node->UseCount();
PrintIndent(); PrintIndent();
...@@ -935,9 +935,9 @@ void PrintScheduledGraph(std::ostream& os, const Schedule* schedule) { ...@@ -935,9 +935,9 @@ void PrintScheduledGraph(std::ostream& os, const Schedule* schedule) {
} }
os << ")" << std::endl; os << ")" << std::endl;
for (BasicBlock::const_iterator i = current->begin(); i != current->end(); for (BasicBlock::const_iterator it = current->begin(); it != current->end();
++i) { ++it) {
Node* node = *i; Node* node = *it;
PrintScheduledNode(os, indent, node); PrintScheduledNode(os, indent, node);
os << std::endl; os << std::endl;
} }
......
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