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

Unified Diff: src/asmjs/asm-wasm-builder.cc

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/asmjs/asm-typer.cc ('k') | src/ast/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-wasm-builder.cc
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc
index 2db8d03c11aba5c0344dc4064433065a4b42bda4..efbdfb6a6b5b083bc12bdd7ab1a2f41527b3b215 100644
--- a/src/asmjs/asm-wasm-builder.cc
+++ b/src/asmjs/asm-wasm-builder.cc
@@ -122,22 +122,21 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
local_variables_.Clear();
}
- void VisitStatements(ZoneList<Statement*>* stmts) {
- for (int i = 0; i < stmts->length(); ++i) {
- Statement* stmt = stmts->at(i);
- ExpressionStatement* e = stmt->AsExpressionStatement();
+ void VisitStatements(ZoneChunkList<Statement*>* statements) {
+ for (Statement* statement : *statements) {
+ ExpressionStatement* e = statement->AsExpressionStatement();
if (e != nullptr && e->expression()->IsUndefinedLiteral()) {
continue;
}
- RECURSE(Visit(stmt));
- if (stmt->IsJump()) break;
+ RECURSE(Visit(statement));
+ if (statement->IsJump()) break;
}
}
void VisitBlock(Block* stmt) {
- if (stmt->statements()->length() == 1) {
+ if (stmt->statements()->size() == 1) {
ExpressionStatement* expr =
- stmt->statements()->at(0)->AsExpressionStatement();
+ stmt->statements()->front()->AsExpressionStatement();
if (expr != nullptr) {
if (expr->expression()->IsAssignment()) {
RECURSE(VisitExpressionStatement(expr));
« no previous file with comments | « src/asmjs/asm-typer.cc ('k') | src/ast/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698