Commit 28f4fe53 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: I066f182f924d634a489b626e899c502f837fe395
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3213139Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77363}
parent 3d5e30cf
......@@ -1213,10 +1213,10 @@ DeoptimizationExit* CodeGenerator::BuildTranslation(
}
if (immediate_args_count != 0) {
auto immediate_args = zone()->New<ZoneVector<ImmediateOperand*>>(zone());
InstructionOperandIterator iter(
InstructionOperandIterator imm_iter(
instr, frame_state_offset - immediate_args_count - 1);
for (size_t i = 0; i < immediate_args_count; i++) {
immediate_args->emplace_back(ImmediateOperand::cast(iter.Advance()));
immediate_args->emplace_back(ImmediateOperand::cast(imm_iter.Advance()));
}
exit->set_immediate_args(immediate_args);
}
......
......@@ -1182,10 +1182,10 @@ std::ostream& operator<<(std::ostream& os, const InstructionSequence& code) {
Constant constant = code.immediates_[i];
os << "IMM#" << i << ": " << constant << "\n";
}
int i = 0;
int n = 0;
for (ConstantMap::const_iterator it = code.constants_.begin();
it != code.constants_.end(); ++i, ++it) {
os << "CST#" << i << ": v" << it->first << " = " << it->second << "\n";
it != code.constants_.end(); ++n, ++it) {
os << "CST#" << n << ": v" << it->first << " = " << it->second << "\n";
}
for (int i = 0; i < code.InstructionBlockCount(); i++) {
auto* block = code.InstructionBlockAt(RpoNumber::FromInt(i));
......
......@@ -70,8 +70,8 @@ bool JumpThreading::ComputeForwarding(Zone* local_zone,
int32_t empty_no_deconstruct_frame_return_size;
// Iterate over the blocks forward, pushing the blocks onto the stack.
for (auto const block : code->instruction_blocks()) {
RpoNumber current = block->rpo_number();
for (auto const instruction_block : code->instruction_blocks()) {
RpoNumber current = instruction_block->rpo_number();
state.PushIfUnvisited(current);
// Process the stack, which implements DFS through empty blocks.
......
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