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

Unified Diff: src/crankshaft/typing.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/crankshaft/typing.h ('k') | src/crankshaft/unique.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/typing.cc
diff --git a/src/crankshaft/typing.cc b/src/crankshaft/typing.cc
index 1215dc25f24b43bcf46104b4e3eae484304f6ab5..2af0492e30ce40e71937f1e1904837713a5c6979 100644
--- a/src/crankshaft/typing.cc
+++ b/src/crankshaft/typing.cc
@@ -114,12 +114,10 @@ void AstTyper::Run() {
RECURSE(VisitStatements(root_->body()));
}
-
-void AstTyper::VisitStatements(ZoneList<Statement*>* stmts) {
- for (int i = 0; i < stmts->length(); ++i) {
- Statement* stmt = stmts->at(i);
- RECURSE(Visit(stmt));
- if (stmt->IsJump()) break;
+void AstTyper::VisitStatements(ZoneChunkList<Statement*>* statements) {
+ for (auto statement : *statements) {
+ RECURSE(Visit(statement));
+ if (statement->IsJump()) break;
}
}
@@ -221,10 +219,10 @@ void AstTyper::VisitSwitchStatement(SwitchStatement* stmt) {
if (!clause_effects.IsEmpty()) complex_effects = true;
}
- ZoneList<Statement*>* stmts = clause->statements();
+ ZoneChunkList<Statement*>* stmts = clause->statements();
RECURSE(VisitStatements(stmts));
ExitEffects();
- if (stmts->is_empty() || stmts->last()->IsJump()) {
+ if (stmts->size() == 0 || stmts->back()->IsJump()) {
local_effects.Alt(clause_effects);
} else {
complex_effects = true;
« no previous file with comments | « src/crankshaft/typing.h ('k') | src/crankshaft/unique.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698