Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: src/ast/ast-traversal-visitor.h

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/ast/prettyprinter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
}
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/ast/prettyprinter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698