[cleanup] Resolve -Wshadow warnings in prettyprinter.cc
Bug: v8:12244, v8:12245 Change-Id: Ic6250a62baadfde87bcd05cfd6c891c91af73f87 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181104 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Auto-Submit: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/main@{#77033}
This commit is contained in:
parent
0dd591915c
commit
1a234ac6bb
@ -346,17 +346,12 @@ void CallPrinter::VisitAssignment(Assignment* node) {
|
||||
Find(node->target());
|
||||
if (node->target()->IsArrayLiteral()) {
|
||||
// Special case the visit for destructuring array assignment.
|
||||
bool was_found = false;
|
||||
if (node->value()->position() == position_) {
|
||||
is_iterator_error_ = true;
|
||||
was_found = !found_;
|
||||
found_ = true;
|
||||
}
|
||||
Find(node->value(), true);
|
||||
if (was_found) {
|
||||
done_ = true;
|
||||
found_ = false;
|
||||
}
|
||||
} else {
|
||||
Find(node->value());
|
||||
}
|
||||
@ -967,7 +962,7 @@ void AstPrinter::VisitWithStatement(WithStatement* node) {
|
||||
|
||||
|
||||
void AstPrinter::VisitSwitchStatement(SwitchStatement* node) {
|
||||
IndentedScope indent(this, "SWITCH", node->position());
|
||||
IndentedScope switch_indent(this, "SWITCH", node->position());
|
||||
PrintIndentedVisit("TAG", node->tag());
|
||||
for (CaseClause* clause : *node->cases()) {
|
||||
if (clause->is_default()) {
|
||||
@ -1247,7 +1242,7 @@ void AstPrinter::PrintObjectProperties(
|
||||
|
||||
|
||||
void AstPrinter::VisitArrayLiteral(ArrayLiteral* node) {
|
||||
IndentedScope indent(this, "ARRAY LITERAL", node->position());
|
||||
IndentedScope array_indent(this, "ARRAY LITERAL", node->position());
|
||||
if (node->values()->length() > 0) {
|
||||
IndentedScope indent(this, "VALUES", node->position());
|
||||
for (int i = 0; i < node->values()->length(); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user