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

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: ...and uncomment the previously failing tests... Created 3 years, 10 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 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1310 } 1310 }
1311 1311
1312 V8_INLINE PreParserStatement 1312 V8_INLINE PreParserStatement
1313 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each, 1313 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each,
1314 PreParserExpression subject, 1314 PreParserExpression subject,
1315 PreParserStatement body, int each_keyword_pos) { 1315 PreParserStatement body, int each_keyword_pos) {
1316 MarkExpressionAsAssigned(each); 1316 MarkExpressionAsAssigned(each);
1317 return stmt; 1317 return stmt;
1318 } 1318 }
1319 1319
1320 V8_INLINE PreParserStatement InitializeForOfStatement(
1321 PreParserStatement stmt, PreParserExpression each,
1322 PreParserExpression iterable, PreParserStatement body, bool finalize,
1323 IteratorType type, int next_result_pos = kNoSourcePosition) {
1324 MarkExpressionAsAssigned(each);
1325 return stmt;
1326 }
1327
1320 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) { 1328 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) {
1321 return PreParserStatement::Null(); 1329 return PreParserStatement::Null();
1322 } 1330 }
1323 1331
1324 V8_INLINE void DesugarBindingInForEachStatement( 1332 V8_INLINE void DesugarBindingInForEachStatement(
1325 ForInfo* for_info, PreParserStatement* body_block, 1333 ForInfo* for_info, PreParserStatement* body_block,
1326 PreParserExpression* each_variable, bool* ok) { 1334 PreParserExpression* each_variable, bool* ok) {
1327 if (track_unresolved_variables_) { 1335 if (track_unresolved_variables_) {
1328 DCHECK(for_info->parsing_result.declarations.length() == 1); 1336 DCHECK(for_info->parsing_result.declarations.length() == 1);
1329 bool is_for_var_of = 1337 bool is_for_var_of =
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 function_state_->NextMaterializedLiteralIndex(); 1708 function_state_->NextMaterializedLiteralIndex();
1701 function_state_->NextMaterializedLiteralIndex(); 1709 function_state_->NextMaterializedLiteralIndex();
1702 } 1710 }
1703 return EmptyExpression(); 1711 return EmptyExpression();
1704 } 1712 }
1705 1713
1706 } // namespace internal 1714 } // namespace internal
1707 } // namespace v8 1715 } // namespace v8
1708 1716
1709 #endif // V8_PARSING_PREPARSER_H 1717 #endif // V8_PARSING_PREPARSER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698