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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 | 820 |
821 static PreParserStatementList NewStatementList(int size, Zone* zone) { | 821 static PreParserStatementList NewStatementList(int size, Zone* zone) { |
822 return PreParserStatementList(); | 822 return PreParserStatementList(); |
823 } | 823 } |
824 | 824 |
825 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { | 825 static PreParserExpressionList NewPropertyList(int size, Zone* zone) { |
826 return PreParserExpressionList(); | 826 return PreParserExpressionList(); |
827 } | 827 } |
828 | 828 |
829 static void AddParameterInitializationBlock( | 829 static void AddParameterInitializationBlock( |
830 const PreParserFormalParameters& parameters, | 830 const PreParserFormalParameters& parameters, PreParserStatementList list, |
831 PreParserStatementList list, bool* ok) {} | 831 bool is_async, bool* ok) {} |
832 | 832 |
833 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, | 833 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, |
834 int* expected_property_count, bool* ok) { | 834 int* expected_property_count, bool* ok) { |
835 UNREACHABLE(); | 835 UNREACHABLE(); |
836 } | 836 } |
837 | 837 |
838 V8_INLINE PreParserStatementList ParseEagerFunctionBody( | 838 V8_INLINE PreParserStatementList ParseEagerFunctionBody( |
839 PreParserIdentifier function_name, int pos, | 839 PreParserIdentifier function_name, int pos, |
840 const PreParserFormalParameters& parameters, FunctionKind kind, | 840 const PreParserFormalParameters& parameters, FunctionKind kind, |
841 FunctionLiteral::FunctionType function_type, bool* ok); | 841 FunctionLiteral::FunctionType function_type, bool* ok); |
842 | 842 |
843 V8_INLINE void ParseArrowFunctionFormalParameterList( | 843 V8_INLINE void ParseArrowFunctionFormalParameterList( |
844 PreParserFormalParameters* parameters, | 844 PreParserFormalParameters* parameters, |
845 PreParserExpression expression, const Scanner::Location& params_loc, | 845 PreParserExpression expression, const Scanner::Location& params_loc, |
846 Scanner::Location* duplicate_loc, bool* ok); | 846 Scanner::Location* duplicate_loc, bool* ok); |
847 | 847 |
| 848 void ParseAsyncArrowSingleExpressionBody( |
| 849 PreParserStatementList body, bool accept_IN, |
| 850 Type::ExpressionClassifier* classifier, int pos, bool* ok); |
| 851 |
848 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); | 852 V8_INLINE PreParserExpression ParseAsyncFunctionExpression(bool* ok); |
849 | 853 |
850 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} | 854 void ReindexLiterals(const PreParserFormalParameters& paramaters) {} |
851 | 855 |
852 struct TemplateLiteralState {}; | 856 struct TemplateLiteralState {}; |
853 | 857 |
854 TemplateLiteralState OpenTemplateLiteral(int pos) { | 858 TemplateLiteralState OpenTemplateLiteral(int pos) { |
855 return TemplateLiteralState(); | 859 return TemplateLiteralState(); |
856 } | 860 } |
857 void AddTemplateSpan(TemplateLiteralState*, bool) {} | 861 void AddTemplateSpan(TemplateLiteralState*, bool) {} |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 const PreParserFormalParameters& parameters, FunctionKind kind, | 1227 const PreParserFormalParameters& parameters, FunctionKind kind, |
1224 FunctionLiteral::FunctionType function_type, bool* ok) { | 1228 FunctionLiteral::FunctionType function_type, bool* ok) { |
1225 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, | 1229 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, |
1226 kind, function_type, ok); | 1230 kind, function_type, ok); |
1227 } | 1231 } |
1228 | 1232 |
1229 } // namespace internal | 1233 } // namespace internal |
1230 } // namespace v8 | 1234 } // namespace v8 |
1231 | 1235 |
1232 #endif // V8_PARSING_PREPARSER_H | 1236 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |