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

Unified Diff: src/parsing/parser.cc

Issue 2457393003: Thread decls-list through Declaration (Closed)
Patch Set: rename 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
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 61d63c7cec2624b3588383b763d71fd499d61f89..91fb46f0dc7a7874693d9aceed0160625d9ca43f 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -3639,10 +3639,8 @@ void Parser::InsertShadowingVarBindingInitializers(Block* inner_block) {
DCHECK(inner_scope->is_declaration_scope());
Scope* function_scope = inner_scope->outer_scope();
DCHECK(function_scope->is_function_scope());
- ZoneList<Declaration*>* decls = inner_scope->declarations();
BlockState block_state(&scope_state_, inner_scope);
- for (int i = 0; i < decls->length(); ++i) {
- Declaration* decl = decls->at(i);
+ for (Declaration* decl : *inner_scope->declarations()) {
if (decl->proxy()->var()->mode() != VAR || !decl->IsVariableDeclaration()) {
continue;
}

Powered by Google App Engine
This is Rietveld 408576698