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) {
__ Goto(&loop, receiver, position);
__ Bind(&loop);
{
Node* receiver = loop.PhiAt(0);
Node* position = loop.PhiAt(1);
receiver = loop.PhiAt(0);
position = loop.PhiAt(1);
Node* receiver_map = __ LoadField(AccessBuilder::ForMap(), receiver);
Node* receiver_instance_type =
__ LoadField(AccessBuilder::ForMapInstanceType(), receiver_map);
......
......@@ -75,7 +75,7 @@ void GraphReducer::ReduceNode(Node* node) {
ReduceTop();
} else if (!revisit_.empty()) {
// If the stack becomes empty, revisit any nodes in the revisit queue.
Node* const node = revisit_.front();
node = revisit_.front();
revisit_.pop();
if (state_.Get(node) == State::kRevisit) {
// state can change while in queue.
......@@ -189,7 +189,7 @@ void GraphReducer::ReduceTop() {
}
// 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) {
Node* input = node_inputs[i];
if (input != node && Recurse(input)) {
......
......@@ -633,21 +633,21 @@ void GraphC1Visualizer::PrintSchedule(const char* phase,
Tag states_tag(this, "states");
Tag locals_tag(this, "locals");
int total = 0;
for (BasicBlock::const_iterator i = current->begin(); i != current->end();
++i) {
if ((*i)->opcode() == IrOpcode::kPhi) total++;
for (BasicBlock::const_iterator it = current->begin();
it != current->end(); ++it) {
if ((*it)->opcode() == IrOpcode::kPhi) total++;
}
PrintIntProperty("size", total);
PrintStringProperty("method", "None");
int index = 0;
for (BasicBlock::const_iterator i = current->begin(); i != current->end();
++i) {
if ((*i)->opcode() != IrOpcode::kPhi) continue;
for (BasicBlock::const_iterator it = current->begin();
it != current->end(); ++it) {
if ((*it)->opcode() != IrOpcode::kPhi) continue;
PrintIndent();
os_ << index << " ";
PrintNodeId(*i);
PrintNodeId(*it);
os_ << " [";
PrintInputs(*i);
PrintInputs(*it);
os_ << "]\n";
index++;
}
......@@ -655,9 +655,9 @@ void GraphC1Visualizer::PrintSchedule(const char* phase,
{
Tag HIR_tag(this, "HIR");
for (BasicBlock::const_iterator i = current->begin(); i != current->end();
++i) {
Node* node = *i;
for (BasicBlock::const_iterator it = current->begin();
it != current->end(); ++it) {
Node* node = *it;
if (node->opcode() == IrOpcode::kPhi) continue;
int uses = node->UseCount();
PrintIndent();
......@@ -935,9 +935,9 @@ void PrintScheduledGraph(std::ostream& os, const Schedule* schedule) {
}
os << ")" << std::endl;
for (BasicBlock::const_iterator i = current->begin(); i != current->end();
++i) {
Node* node = *i;
for (BasicBlock::const_iterator it = current->begin(); it != current->end();
++it) {
Node* node = *it;
PrintScheduledNode(os, indent, node);
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