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

Unified Diff: src/parsing/parser.h

Issue 2119353002: [parser] Fix bug in for-of desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 5 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 | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 9b070d52b708aab0e52d046388acb966ebe08d55..35711b068f92b59adc3527e61cd3936692bb8a0c 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -458,7 +458,8 @@ class ParserTraits {
void FinalizeIteratorUse(Variable* completion, Expression* condition,
Variable* iter, Block* iterator_use, Block* result);
- Statement* FinalizeForOfStatement(ForOfStatement* loop, int pos);
+ Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion,
+ int pos);
// Reporting errors.
void ReportMessageAt(Scanner::Location source_location,
@@ -961,12 +962,13 @@ class Parser : public ParserBase<ParserTraits> {
// Initialize the components of a for-in / for-of statement.
- void InitializeForEachStatement(ForEachStatement* stmt, Expression* each,
- Expression* subject, Statement* body,
- int each_keyword_pos);
- void InitializeForOfStatement(ForOfStatement* stmt, Expression* each,
- Expression* iterable, Statement* body,
- int next_result_pos = kNoSourcePosition);
+ Statement* InitializeForEachStatement(ForEachStatement* stmt,
+ Expression* each, Expression* subject,
+ Statement* body, int each_keyword_pos);
+ Statement* InitializeForOfStatement(ForOfStatement* stmt, Expression* each,
+ Expression* iterable, Statement* body,
+ bool finalize,
+ int next_result_pos = kNoSourcePosition);
Statement* DesugarLexicalBindingsInForStatement(
Scope* inner_scope, VariableMode mode,
ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init,
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698