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

Unified Diff: test/cctest/asmjs/test-asm-typer.cc

Issue 2457393003: Thread decls-list through Declaration (Closed)
Patch Set: rebase Created 4 years, 1 month 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/utils.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/utils.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698