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

Unified Diff: src/parsing/preparser.h

Issue 2669163002: [parser] Skipping inner funcs: produce the same scopes / variables for (some) loops. (Closed)
Patch Set: code review (vogelheim@) Created 3 years, 11 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/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 84d07e71d887163a4a63298f4e185a01de0793d5..0120c2c5dffaf33bb24982f1447b6baa2d2b4dc2 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -1336,6 +1336,11 @@ class PreParser : public ParserBase<PreParser> {
PreParserExpression cond, PreParserStatement next,
PreParserStatement body, Scope* inner_scope, const ForInfo& for_info,
bool* ok) {
+ // See Parser::DesugarLexicalBindingsInForStatement.
+ for (int i = 0; i < for_info.bound_names.length(); i++) {
+ inner_scope->DeclareVariableName(for_info.bound_names[i],
+ for_info.parsing_result.descriptor.mode);
+ }
return loop;
}
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698