OLD | NEW |
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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 int pos) { | 758 int pos) { |
759 return PreParserStatement::Default(); | 759 return PreParserStatement::Default(); |
760 } | 760 } |
761 | 761 |
762 PreParserStatement NewForEachStatement(ForEachStatement::VisitMode visit_mode, | 762 PreParserStatement NewForEachStatement(ForEachStatement::VisitMode visit_mode, |
763 ZoneList<const AstRawString*>* labels, | 763 ZoneList<const AstRawString*>* labels, |
764 int pos) { | 764 int pos) { |
765 return PreParserStatement::Default(); | 765 return PreParserStatement::Default(); |
766 } | 766 } |
767 | 767 |
| 768 PreParserStatement NewForOfStatement(ZoneList<const AstRawString*>* labels, |
| 769 int pos) { |
| 770 return PreParserStatement::Default(); |
| 771 } |
| 772 |
768 PreParserExpression NewCallRuntime(Runtime::FunctionId id, | 773 PreParserExpression NewCallRuntime(Runtime::FunctionId id, |
769 ZoneList<PreParserExpression>* arguments, | 774 ZoneList<PreParserExpression>* arguments, |
770 int pos) { | 775 int pos) { |
771 return PreParserExpression::Default(); | 776 return PreParserExpression::Default(); |
772 } | 777 } |
773 | 778 |
774 // Return the object itself as AstVisitor and implement the needed | 779 // Return the object itself as AstVisitor and implement the needed |
775 // dummy method right in this class. | 780 // dummy method right in this class. |
776 PreParserFactory* visitor() { return this; } | 781 PreParserFactory* visitor() { return this; } |
777 int* ast_properties() { | 782 int* ast_properties() { |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1310 } | 1315 } |
1311 | 1316 |
1312 V8_INLINE PreParserStatement | 1317 V8_INLINE PreParserStatement |
1313 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each, | 1318 InitializeForEachStatement(PreParserStatement stmt, PreParserExpression each, |
1314 PreParserExpression subject, | 1319 PreParserExpression subject, |
1315 PreParserStatement body, int each_keyword_pos) { | 1320 PreParserStatement body, int each_keyword_pos) { |
1316 MarkExpressionAsAssigned(each); | 1321 MarkExpressionAsAssigned(each); |
1317 return stmt; | 1322 return stmt; |
1318 } | 1323 } |
1319 | 1324 |
| 1325 V8_INLINE PreParserStatement InitializeForOfStatement( |
| 1326 PreParserStatement stmt, PreParserExpression each, |
| 1327 PreParserExpression iterable, PreParserStatement body, bool finalize, |
| 1328 IteratorType type, int next_result_pos = kNoSourcePosition) { |
| 1329 MarkExpressionAsAssigned(each); |
| 1330 return stmt; |
| 1331 } |
| 1332 |
1320 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) { | 1333 V8_INLINE PreParserStatement RewriteForVarInLegacy(const ForInfo& for_info) { |
1321 return PreParserStatement::Null(); | 1334 return PreParserStatement::Null(); |
1322 } | 1335 } |
1323 | 1336 |
1324 V8_INLINE void DesugarBindingInForEachStatement( | 1337 V8_INLINE void DesugarBindingInForEachStatement( |
1325 ForInfo* for_info, PreParserStatement* body_block, | 1338 ForInfo* for_info, PreParserStatement* body_block, |
1326 PreParserExpression* each_variable, bool* ok) { | 1339 PreParserExpression* each_variable, bool* ok) { |
1327 if (track_unresolved_variables_) { | 1340 if (track_unresolved_variables_) { |
1328 DCHECK(for_info->parsing_result.declarations.length() == 1); | 1341 DCHECK(for_info->parsing_result.declarations.length() == 1); |
1329 bool is_for_var_of = | 1342 bool is_for_var_of = |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1700 function_state_->NextMaterializedLiteralIndex(); | 1713 function_state_->NextMaterializedLiteralIndex(); |
1701 function_state_->NextMaterializedLiteralIndex(); | 1714 function_state_->NextMaterializedLiteralIndex(); |
1702 } | 1715 } |
1703 return EmptyExpression(); | 1716 return EmptyExpression(); |
1704 } | 1717 } |
1705 | 1718 |
1706 } // namespace internal | 1719 } // namespace internal |
1707 } // namespace v8 | 1720 } // namespace v8 |
1708 | 1721 |
1709 #endif // V8_PARSING_PREPARSER_H | 1722 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |