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: rebase 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 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } 1300 }
1301 1301
1302 V8_INLINE PreParserStatement 1302 V8_INLINE PreParserStatement
1303 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each, 1303 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each,
1304 PreParserExpression subject, 1304 PreParserExpression subject,
1305 PreParserStatement body, int each_keyword_pos) { 1305 PreParserStatement body, int each_keyword_pos) {
1306 MarkExpressionAsAssigned(each); 1306 MarkExpressionAsAssigned(each);
1307 return stmt; 1307 return stmt;
1308 } 1308 }
1309 1309
1310 V8_INLINE PreParserStatement InitializeForOfStatement(
1311 PreParserStatement stmt, PreParserExpression each,
1312 PreParserExpression iterable, PreParserStatement body, bool finalize,
1313 IteratorType type, int next_result_pos = kNoSourcePosition) {
1314 MarkExpressionAsAssigned(each);
1315 return stmt;
1316 }
1317
1310 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) { 1318 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) {
1311 return PreParserStatement::Null(); 1319 return PreParserStatement::Null();
1312 } 1320 }
1313 1321
1314 V8_INLINE void DesugarBindingInForEachStatement( 1322 V8_INLINE void DesugarBindingInForEachStatement(
1315 ForInfo* for_info, PreParserStatement* body_block, 1323 ForInfo* for_info, PreParserStatement* body_block,
1316 PreParserExpression* each_variable, bool* ok) { 1324 PreParserExpression* each_variable, bool* ok) {
1317 if (track_unresolved_variables_) { 1325 if (track_unresolved_variables_) {
1318 DCHECK(for_info->parsing_result.declarations.length() == 1); 1326 DCHECK(for_info->parsing_result.declarations.length() == 1);
1319 DeclareAndInitializeVariables( 1327 DeclareAndInitializeVariables(
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1656 function_state_->NextMaterializedLiteralIndex(); 1664 function_state_->NextMaterializedLiteralIndex();
1657 function_state_->NextMaterializedLiteralIndex(); 1665 function_state_->NextMaterializedLiteralIndex();
1658 } 1666 }
1659 return EmptyExpression(); 1667 return EmptyExpression();
1660 } 1668 }
1661 1669
1662 } // namespace internal 1670 } // namespace internal
1663 } // namespace v8 1671 } // namespace v8
1664 1672
1665 #endif // V8_PARSING_PREPARSER_H 1673 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698