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

Unified Diff: src/asmjs/asm-typer.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.h ('k') | src/asmjs/asm-wasm-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-typer.cc
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc
index 6640bbab6b67fce0fc2b81f07a72e9f4ed980884..5f9358c9e806e8ef2a482b5dcf5dd4f4530450ec 100644
--- a/src/asmjs/asm-typer.cc
+++ b/src/asmjs/asm-typer.cc
@@ -60,7 +60,7 @@ using v8::internal::GetCurrentStackPosition;
// Implementation of AsmTyper::FlattenedStatements
AsmTyper::FlattenedStatements::FlattenedStatements(Zone* zone,
- ZoneList<Statement*>* s)
+ ZoneChunkList<Statement*>* s)
: context_stack_(zone) {
context_stack_.emplace_back(Context(s));
}
@@ -73,13 +73,12 @@ Statement* AsmTyper::FlattenedStatements::Next() {
Context* current = &context_stack_.back();
- if (current->statements_->length() <= current->next_index_) {
+ if (current->current_ == current->end_) {
context_stack_.pop_back();
continue;
}
- Statement* current_statement =
- current->statements_->at(current->next_index_++);
+ Statement* current_statement = *(current->current_++);
if (current_statement->IsBlock()) {
context_stack_.emplace_back(
Context(current_statement->AsBlock()->statements()));
@@ -1140,13 +1139,13 @@ AsmType* AsmTyper::ValidateFunction(FunctionDeclaration* fun_decl) {
// 5.2 Return Type Annotations
// *VIOLATION* we peel blocks to find the last statement in the asm module
// because the parser may introduce synthetic blocks.
- ZoneList<Statement*>* statements = fun->body();
+ ZoneChunkList<Statement*>* statements = fun->body();
do {
- if (statements->length() == 0) {
+ if (statements->size() == 0) {
return_type_ = AsmType::Void();
} else {
- auto* last_statement = statements->last();
+ auto* last_statement = statements->back();
auto* as_block = last_statement->AsBlock();
if (as_block != nullptr) {
statements = as_block->statements();
« no previous file with comments | « src/asmjs/asm-typer.h ('k') | src/asmjs/asm-wasm-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698