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

Unified Diff: src/parsing/parser.cc

Issue 2226803003: Replace SloppyBlockFunctionMap::Vector with linked list through SloppyBlockFunctionStatement (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/ast/scopes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 53506a9d91c1253a115401c6bc8a1e6b948bb826..da7ee6376764ebc1b297efe660d8b31b10620e44 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -5283,7 +5283,7 @@ void Parser::InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope,
bool var_created = false;
// Write in assignments to var for each block-scoped function declaration
- auto delegates = static_cast<SloppyBlockFunctionMap::Vector*>(p->value);
+ auto delegates = static_cast<SloppyBlockFunctionStatement*>(p->value);
DeclarationScope* decl_scope = scope;
while (decl_scope->is_eval_scope()) {
@@ -5291,7 +5291,8 @@ void Parser::InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope,
}
Scope* outer_scope = decl_scope->outer_scope();
- for (SloppyBlockFunctionStatement* delegate : *delegates) {
+ for (SloppyBlockFunctionStatement* delegate = delegates;
+ delegate != nullptr; delegate = delegate->next()) {
// Check if there's a conflict with a lexical declaration
Scope* query_scope = delegate->scope()->outer_scope();
Variable* var = nullptr;
« no previous file with comments | « src/ast/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698