| Index: src/ast/ast-traversal-visitor.h
|
| diff --git a/src/ast/ast-traversal-visitor.h b/src/ast/ast-traversal-visitor.h
|
| index 38788769073a139d770cb619093ce901f3438e07..66b27359fbbd9fdec11a183bbd091b52f8fcf4bc 100644
|
| --- a/src/ast/ast-traversal-visitor.h
|
| +++ b/src/ast/ast-traversal-visitor.h
|
| @@ -41,7 +41,7 @@ class AstTraversalVisitor : public AstVisitor<Subclass> {
|
|
|
| // Iteration left-to-right.
|
| void VisitDeclarations(ZoneList<Declaration*>* declarations);
|
| - void VisitStatements(ZoneList<Statement*>* statements);
|
| + void VisitStatements(ZoneChunkList<Statement*>* statements);
|
|
|
| // Individual nodes
|
| #define DECLARE_VISIT(type) void Visit##type(type* node);
|
| @@ -113,11 +113,10 @@ void AstTraversalVisitor<Subclass>::VisitDeclarations(
|
|
|
| template <class Subclass>
|
| void AstTraversalVisitor<Subclass>::VisitStatements(
|
| - ZoneList<Statement*>* stmts) {
|
| - for (int i = 0; i < stmts->length(); ++i) {
|
| - Statement* stmt = stmts->at(i);
|
| - RECURSE(Visit(stmt));
|
| - if (stmt->IsJump()) break;
|
| + ZoneChunkList<Statement*>* statements) {
|
| + for (auto statement : *statements) {
|
| + RECURSE(Visit(statement));
|
| + if (statement->IsJump()) break;
|
| }
|
| }
|
|
|
| @@ -203,7 +202,7 @@ void AstTraversalVisitor<Subclass>::VisitSwitchStatement(
|
| Expression* label = clause->label();
|
| RECURSE(Visit(label));
|
| }
|
| - ZoneList<Statement*>* stmts = clause->statements();
|
| + ZoneChunkList<Statement*>* stmts = clause->statements();
|
| RECURSE(VisitStatements(stmts));
|
| }
|
| }
|
|
|