Index: test/cctest/asmjs/test-asm-typer.cc |
diff --git a/test/cctest/asmjs/test-asm-typer.cc b/test/cctest/asmjs/test-asm-typer.cc |
index 290bd6c814f4a7b25919fbee48d6d62f7dc5f4e5..4eaa154a6eabb45fc3b93ebb626177965701796f 100644 |
--- a/test/cctest/asmjs/test-asm-typer.cc |
+++ b/test/cctest/asmjs/test-asm-typer.cc |
@@ -64,17 +64,18 @@ class AsmTyperHarnessBuilder { |
} |
outer_scope_ = info.script_scope(); |
- module_ = |
- info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun(); |
+ module_ = info.scope() |
+ ->declarations() |
+ ->AtForTest(0) |
+ ->AsFunctionDeclaration() |
+ ->fun(); |
typer_.reset(new AsmTyper(isolate_, zone_, *script_, module_)); |
if (validation_type_ == ValidateStatement || |
validation_type_ == ValidateExpression) { |
fun_scope_.reset(new AsmTyper::FunctionScope(typer_.get())); |
- auto* decls = module_->scope()->declarations(); |
- for (int ii = 0; ii < decls->length(); ++ii) { |
- Declaration* decl = decls->at(ii); |
+ for (Declaration* decl : *module_->scope()->declarations()) { |
if (FunctionDeclaration* fun_decl = decl->AsFunctionDeclaration()) { |
fun_decl_ = fun_decl; |
break; |