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

Side by Side Diff: src/parsing/preparser.h

Issue 2637403008: [async-iteration] add support for for-await-of loops in Async Functions (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 } 1293 }
1294 1294
1295 V8_INLINE PreParserStatement 1295 V8_INLINE PreParserStatement
1296 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each, 1296 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each,
1297 PreParserExpression subject, 1297 PreParserExpression subject,
1298 PreParserStatement body, int each_keyword_pos) { 1298 PreParserStatement body, int each_keyword_pos) {
1299 MarkExpressionAsAssigned(each); 1299 MarkExpressionAsAssigned(each);
1300 return stmt; 1300 return stmt;
1301 } 1301 }
1302 1302
1303 V8_INLINE PreParserStatement InitializeForAwaitOfStatement(
1304 PreParserStatement stmt, PreParserExpression each,
1305 PreParserExpression iterable, PreParserStatement body, bool finalize,
1306 int next_result_pos = kNoSourcePosition) {
1307 MarkExpressionAsAssigned(each);
1308 return stmt;
1309 }
1310
1303 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) { 1311 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) {
1304 return PreParserStatement::Null(); 1312 return PreParserStatement::Null();
1305 } 1313 }
1306 1314
1307 V8_INLINE void DesugarBindingInForEachStatement( 1315 V8_INLINE void DesugarBindingInForEachStatement(
1308 ForInfo* for_info, PreParserStatement* body_block, 1316 ForInfo* for_info, PreParserStatement* body_block,
1309 PreParserExpression* each_variable, bool* ok) { 1317 PreParserExpression* each_variable, bool* ok) {
1310 if (track_unresolved_variables_) { 1318 if (track_unresolved_variables_) {
1311 DCHECK(for_info->parsing_result.declarations.length() == 1); 1319 DCHECK(for_info->parsing_result.declarations.length() == 1);
1312 DeclareAndInitializeVariables( 1320 DeclareAndInitializeVariables(
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 function_state_->NextMaterializedLiteralIndex(); 1663 function_state_->NextMaterializedLiteralIndex();
1656 function_state_->NextMaterializedLiteralIndex(); 1664 function_state_->NextMaterializedLiteralIndex();
1657 } 1665 }
1658 return EmptyExpression(); 1666 return EmptyExpression();
1659 } 1667 }
1660 1668
1661 } // namespace internal 1669 } // namespace internal
1662 } // namespace v8 1670 } // namespace v8
1663 1671
1664 #endif // V8_PARSING_PREPARSER_H 1672 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698