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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 | 1193 |
1194 void CheckConflictingVarDeclarations(Scope* scope, bool* ok) {} | 1194 void CheckConflictingVarDeclarations(Scope* scope, bool* ok) {} |
1195 | 1195 |
1196 // Temporary glue; these functions will move to ParserBase. | 1196 // Temporary glue; these functions will move to ParserBase. |
1197 PreParserExpression ParseV8Intrinsic(bool* ok); | 1197 PreParserExpression ParseV8Intrinsic(bool* ok); |
1198 V8_INLINE PreParserExpression ParseDoExpression(bool* ok); | 1198 V8_INLINE PreParserExpression ParseDoExpression(bool* ok); |
1199 PreParserExpression ParseFunctionLiteral( | 1199 PreParserExpression ParseFunctionLiteral( |
1200 PreParserIdentifier name, Scanner::Location function_name_location, | 1200 PreParserIdentifier name, Scanner::Location function_name_location, |
1201 FunctionNameValidity function_name_validity, FunctionKind kind, | 1201 FunctionNameValidity function_name_validity, FunctionKind kind, |
1202 int function_token_position, FunctionLiteral::FunctionType type, | 1202 int function_token_position, FunctionLiteral::FunctionType type, |
1203 LanguageMode language_mode, bool* ok); | 1203 LanguageMode language_mode, typesystem::TypeFlags type_flags, bool* ok); |
1204 | 1204 |
1205 PreParserExpression ParseClassLiteral(PreParserIdentifier name, | 1205 PreParserExpression ParseClassLiteral(PreParserIdentifier name, |
1206 Scanner::Location class_name_location, | 1206 Scanner::Location class_name_location, |
1207 bool name_is_strict_reserved, int pos, | 1207 bool name_is_strict_reserved, int pos, |
1208 bool* ok); | 1208 bool* ok); |
1209 | 1209 |
1210 PreParserExpressionList PrepareSpreadArguments(PreParserExpressionList list) { | 1210 PreParserExpressionList PrepareSpreadArguments(PreParserExpressionList list) { |
1211 return list; | 1211 return list; |
1212 } | 1212 } |
1213 | 1213 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 Expression ParseV8Intrinsic(bool* ok); | 1371 Expression ParseV8Intrinsic(bool* ok); |
1372 Expression ParseDoExpression(bool* ok); | 1372 Expression ParseDoExpression(bool* ok); |
1373 | 1373 |
1374 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, | 1374 V8_INLINE void SkipLazyFunctionBody(int* materialized_literal_count, |
1375 int* expected_property_count, bool* ok); | 1375 int* expected_property_count, bool* ok); |
1376 V8_INLINE PreParserStatementList ParseEagerFunctionBody( | 1376 V8_INLINE PreParserStatementList ParseEagerFunctionBody( |
1377 PreParserIdentifier function_name, int pos, | 1377 PreParserIdentifier function_name, int pos, |
1378 const PreParserFormalParameters& parameters, FunctionKind kind, | 1378 const PreParserFormalParameters& parameters, FunctionKind kind, |
1379 FunctionLiteral::FunctionType function_type, bool* ok); | 1379 FunctionLiteral::FunctionType function_type, bool* ok); |
1380 | 1380 |
1381 Expression ParseFunctionLiteral( | 1381 Expression ParseFunctionLiteral(Identifier name, |
1382 Identifier name, Scanner::Location function_name_location, | 1382 Scanner::Location function_name_location, |
1383 FunctionNameValidity function_name_validity, FunctionKind kind, | 1383 FunctionNameValidity function_name_validity, |
1384 int function_token_pos, FunctionLiteral::FunctionType function_type, | 1384 FunctionKind kind, int function_token_pos, |
1385 LanguageMode language_mode, bool* ok); | 1385 FunctionLiteral::FunctionType function_type, |
| 1386 LanguageMode language_mode, |
| 1387 typesystem::TypeFlags type_flags, bool* ok); |
1386 void ParseLazyFunctionLiteralBody(bool* ok, | 1388 void ParseLazyFunctionLiteralBody(bool* ok, |
1387 Scanner::BookmarkScope* bookmark = nullptr); | 1389 Scanner::BookmarkScope* bookmark = nullptr); |
1388 | 1390 |
1389 PreParserExpression ParseClassLiteral(PreParserIdentifier name, | 1391 PreParserExpression ParseClassLiteral(PreParserIdentifier name, |
1390 Scanner::Location class_name_location, | 1392 Scanner::Location class_name_location, |
1391 bool name_is_strict_reserved, int pos, | 1393 bool name_is_strict_reserved, int pos, |
1392 bool* ok); | 1394 bool* ok); |
1393 }; | 1395 }; |
1394 | 1396 |
1395 | 1397 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 const PreParserFormalParameters& parameters, FunctionKind kind, | 1481 const PreParserFormalParameters& parameters, FunctionKind kind, |
1480 FunctionLiteral::FunctionType function_type, bool* ok) { | 1482 FunctionLiteral::FunctionType function_type, bool* ok) { |
1481 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, | 1483 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, |
1482 kind, function_type, ok); | 1484 kind, function_type, ok); |
1483 } | 1485 } |
1484 | 1486 |
1485 } // namespace internal | 1487 } // namespace internal |
1486 } // namespace v8 | 1488 } // namespace v8 |
1487 | 1489 |
1488 #endif // V8_PARSING_PREPARSER_H | 1490 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |