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

Unified Diff: src/parsing/parser.h

Issue 2637403008: [async-iteration] add support for for-await-of loops in Async Functions (Closed)
Patch Set: [async-iteration] add support for for-await-of loops in Async Functions 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
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 0ae8fb9cd100270fb29be1e1287c15b927420f40..fa92590e7edd19681bd42f81d5f41e98ced3ee98 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -457,16 +457,17 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
// !%_IsJSReceiver(result = iterator.next()) &&
// %ThrowIteratorResultNotAnObject(result)
neis 2017/01/24 12:49:19 Comment needs an update.
caitp 2017/01/24 22:51:55 done
Expression* BuildIteratorNextResult(Expression* iterator, Variable* result,
- int pos);
+ IteratorType type, int pos);
// Initialize the components of a for-in / for-of statement.
Statement* InitializeForEachStatement(ForEachStatement* stmt,
Expression* each, Expression* subject,
Statement* body, int each_keyword_pos);
- Statement* InitializeForOfStatement(ForOfStatement* stmt, Expression* each,
+ Statement* InitializeForOfStatement(ForEachStatement* stmt, Expression* each,
Expression* iterable, Statement* body,
- bool finalize,
+ bool finalize, IteratorType type,
int next_result_pos = kNoSourcePosition);
+
Block* RewriteForVarInLegacy(const ForInfo& for_info);
void DesugarBindingInForEachStatement(ForInfo* for_info, Block** body_block,
Expression** each_variable, bool* ok);
@@ -638,16 +639,18 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
void FinalizeIteratorUse(Scope* use_scope, Variable* completion,
Expression* condition, Variable* iter,
- Block* iterator_use, Block* result);
+ Block* iterator_use, Block* result,
+ IteratorType type);
Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion,
- int pos);
+ IteratorType type, int pos);
void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator,
Variable* input, Variable* output);
void BuildIteratorCloseForCompletion(Scope* scope,
ZoneList<Statement*>* statements,
Variable* iterator,
- Expression* completion);
+ Expression* completion,
+ IteratorType type);
Statement* CheckCallable(Variable* var, Expression* error, int pos);
V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos);

Powered by Google App Engine
This is Rietveld 408576698