| Index: src/parsing/parser.h
|
| diff --git a/src/parsing/parser.h b/src/parsing/parser.h
|
| index a898511b237afe925acf65d351c7ca40258aebbb..5187e2c16819b1c34ff24074e96462f975fbe974 100644
|
| --- a/src/parsing/parser.h
|
| +++ b/src/parsing/parser.h
|
| @@ -28,6 +28,8 @@ class ScriptData;
|
| class ParserTarget;
|
| class ParserTargetScope;
|
|
|
| +enum class IteratorType { kNormal, kAsync };
|
| +
|
| class FunctionEntry BASE_EMBEDDED {
|
| public:
|
| enum {
|
| @@ -449,7 +451,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
|
| // !%_IsJSReceiver(result = iterator.next()) &&
|
| // %ThrowIteratorResultNotAnObject(result)
|
| 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,
|
| @@ -459,6 +461,10 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
|
| Expression* iterable, Statement* body,
|
| bool finalize,
|
| int next_result_pos = kNoSourcePosition);
|
| + Statement* InitializeForAwaitOfStatement(
|
| + ForEachStatement* stmt, Expression* each, Expression* iterable,
|
| + Statement* body, bool finalize, int next_result_pos = kNoSourcePosition);
|
| +
|
| Block* RewriteForVarInLegacy(const ForInfo& for_info);
|
| void DesugarBindingInForEachStatement(ForInfo* for_info, Block** body_block,
|
| Expression** each_variable, bool* ok);
|
| @@ -636,16 +642,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);
|
| + Variable* input, Variable* output, IteratorType type);
|
| 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);
|
|
|