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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 | 884 |
885 // Temporary glue; these functions will move to ParserBase. | 885 // Temporary glue; these functions will move to ParserBase. |
886 PreParserExpression ParseV8Intrinsic(bool* ok); | 886 PreParserExpression ParseV8Intrinsic(bool* ok); |
887 V8_INLINE PreParserExpression ParseDoExpression(bool* ok); | 887 V8_INLINE PreParserExpression ParseDoExpression(bool* ok); |
888 PreParserExpression ParseFunctionLiteral( | 888 PreParserExpression ParseFunctionLiteral( |
889 PreParserIdentifier name, Scanner::Location function_name_location, | 889 PreParserIdentifier name, Scanner::Location function_name_location, |
890 FunctionNameValidity function_name_validity, FunctionKind kind, | 890 FunctionNameValidity function_name_validity, FunctionKind kind, |
891 int function_token_position, FunctionLiteral::FunctionType type, | 891 int function_token_position, FunctionLiteral::FunctionType type, |
892 LanguageMode language_mode, bool* ok); | 892 LanguageMode language_mode, bool* ok); |
893 | 893 |
894 PreParserExpression ParseClassLiteral(PreParserIdentifier name, | 894 PreParserExpression ParseClassLiteral(Type::ExpressionClassifier* classifier, |
| 895 PreParserIdentifier name, |
895 Scanner::Location class_name_location, | 896 Scanner::Location class_name_location, |
896 bool name_is_strict_reserved, int pos, | 897 bool name_is_strict_reserved, int pos, |
897 bool* ok); | 898 bool* ok); |
898 | 899 |
899 V8_INLINE void MarkTailPosition(PreParserExpression) {} | 900 V8_INLINE void MarkTailPosition(PreParserExpression) {} |
900 | 901 |
901 PreParserExpressionList PrepareSpreadArguments(PreParserExpressionList list) { | 902 PreParserExpressionList PrepareSpreadArguments(PreParserExpressionList list) { |
902 return list; | 903 return list; |
903 } | 904 } |
904 | 905 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 FunctionLiteral::FunctionType function_type, bool* ok); | 1090 FunctionLiteral::FunctionType function_type, bool* ok); |
1090 | 1091 |
1091 Expression ParseFunctionLiteral( | 1092 Expression ParseFunctionLiteral( |
1092 Identifier name, Scanner::Location function_name_location, | 1093 Identifier name, Scanner::Location function_name_location, |
1093 FunctionNameValidity function_name_validity, FunctionKind kind, | 1094 FunctionNameValidity function_name_validity, FunctionKind kind, |
1094 int function_token_pos, FunctionLiteral::FunctionType function_type, | 1095 int function_token_pos, FunctionLiteral::FunctionType function_type, |
1095 LanguageMode language_mode, bool* ok); | 1096 LanguageMode language_mode, bool* ok); |
1096 void ParseLazyFunctionLiteralBody(bool* ok, | 1097 void ParseLazyFunctionLiteralBody(bool* ok, |
1097 Scanner::BookmarkScope* bookmark = nullptr); | 1098 Scanner::BookmarkScope* bookmark = nullptr); |
1098 | 1099 |
1099 PreParserExpression ParseClassLiteral(PreParserIdentifier name, | 1100 PreParserExpression ParseClassLiteral(ExpressionClassifier* classifier, |
| 1101 PreParserIdentifier name, |
1100 Scanner::Location class_name_location, | 1102 Scanner::Location class_name_location, |
1101 bool name_is_strict_reserved, int pos, | 1103 bool name_is_strict_reserved, int pos, |
1102 bool* ok); | 1104 bool* ok); |
1103 | 1105 |
1104 int* use_counts_; | 1106 int* use_counts_; |
1105 }; | 1107 }; |
1106 | 1108 |
1107 | 1109 |
1108 void PreParserTraits::MaterializeTemplateCallsiteLiterals() { | 1110 void PreParserTraits::MaterializeTemplateCallsiteLiterals() { |
1109 pre_parser_->function_state_->NextMaterializedLiteralIndex(); | 1111 pre_parser_->function_state_->NextMaterializedLiteralIndex(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 const PreParserFormalParameters& parameters, FunctionKind kind, | 1199 const PreParserFormalParameters& parameters, FunctionKind kind, |
1198 FunctionLiteral::FunctionType function_type, bool* ok) { | 1200 FunctionLiteral::FunctionType function_type, bool* ok) { |
1199 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, | 1201 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, |
1200 kind, function_type, ok); | 1202 kind, function_type, ok); |
1201 } | 1203 } |
1202 | 1204 |
1203 } // namespace internal | 1205 } // namespace internal |
1204 } // namespace v8 | 1206 } // namespace v8 |
1205 | 1207 |
1206 #endif // V8_PARSING_PREPARSER_H | 1208 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |