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/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/hashmap.h" | 10 #include "src/hashmap.h" |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 | 828 |
829 static PreParserStatementList NewStatementList(int size, Zone* zone) { | 829 static PreParserStatementList NewStatementList(int size, Zone* zone) { |
830 return PreParserStatementList(); | 830 return PreParserStatementList(); |
831 } | 831 } |
832 | 832 |
833 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { | 833 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { |
834 return PreParserExpressionList(); | 834 return PreParserExpressionList(); |
835 } | 835 } |
836 | 836 |
837 static void AddParameterInitializationBlock( | 837 static void AddParameterInitializationBlock( |
838 const PreParserFormalParameters& parameters, | 838 const PreParserFormalParameters& parameters, PreParserStatementList list, |
839 PreParserStatementList list, bool* ok) {} | 839 bool is_async, bool* ok) {} |
840 | 840 |
841 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, | 841 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, |
842 int* expected_property_count, bool* ok) { | 842 int* expected_property_count, bool* ok) { |
843 UNREACHABLE(); | 843 UNREACHABLE(); |
844 } | 844 } |
845 | 845 |
846 V8_INLINE PreParserStatementList ParseEagerFunctionBody( | 846 V8_INLINE PreParserStatementList ParseEagerFunctionBody( |
847 PreParserIdentifier function_name, int pos, | 847 PreParserIdentifier function_name, int pos, |
848 const PreParserFormalParameters& parameters, FunctionKind kind, | 848 const PreParserFormalParameters& parameters, FunctionKind kind, |
849 FunctionLiteral::FunctionType function_type, bool* ok); | 849 FunctionLiteral::FunctionType function_type, bool* ok); |
850 | 850 |
851 V8_INLINE void ParseArrowFunctionFormalParameterList( | 851 V8_INLINE void ParseArrowFunctionFormalParameterList( |
852 PreParserFormalParameters* parameters, | 852 PreParserFormalParameters* parameters, |
853 PreParserExpression expression, const Scanner::Location& params_loc, | 853 PreParserExpression expression, const Scanner::Location& params_loc, |
854 Scanner::Location* duplicate_loc, bool* ok); | 854 Scanner::Location* duplicate_loc, bool* ok); |
855 | 855 |
| 856 void ParseAsyncArrowSingleExpressionBody( |
| 857 PreParserStatementList body, bool accept_IN, |
| 858 Type::ExpressionClassifier* classifier, int pos, bool* ok); |
| 859 |
856 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); | 860 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); |
857 | 861 |
858 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} | 862 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} |
859 | 863 |
860 struct TemplateLiteralState {}; | 864 struct TemplateLiteralState {}; |
861 | 865 |
862 TemplateLiteralState OpenTemplateLiteral(int pos) { | 866 TemplateLiteralState OpenTemplateLiteral(int pos) { |
863 return TemplateLiteralState(); | 867 return TemplateLiteralState(); |
864 } | 868 } |
865 void AddTemplateSpan(TemplateLiteralState*, bool) {} | 869 void AddTemplateSpan(TemplateLiteralState*, bool) {} |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 const PreParserFormalParameters& parameters, FunctionKind kind, | 1206 const PreParserFormalParameters& parameters, FunctionKind kind, |
1203 FunctionLiteral::FunctionType function_type, bool* ok) { | 1207 FunctionLiteral::FunctionType function_type, bool* ok) { |
1204 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, | 1208 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, |
1205 kind, function_type, ok); | 1209 kind, function_type, ok); |
1206 } | 1210 } |
1207 | 1211 |
1208 } // namespace internal | 1212 } // namespace internal |
1209 } // namespace v8 | 1213 } // namespace v8 |
1210 | 1214 |
1211 #endif // V8_PARSING_PREPARSER_H | 1215 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |