| 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();
|
|
|