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/parsing/parser-base.h" | 9 #include "src/parsing/parser-base.h" |
10 | 10 |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 // All ParseXXX functions take as the last argument an *ok parameter | 904 // All ParseXXX functions take as the last argument an *ok parameter |
905 // which is set to false if parsing failed; it is unchanged otherwise. | 905 // which is set to false if parsing failed; it is unchanged otherwise. |
906 // By making the 'exception handling' explicit, we are forced to check | 906 // By making the 'exception handling' explicit, we are forced to check |
907 // for failure at the call sites. | 907 // for failure at the call sites. |
908 | 908 |
909 V8_INLINE PreParserStatementList ParseEagerFunctionBody( | 909 V8_INLINE PreParserStatementList ParseEagerFunctionBody( |
910 PreParserIdentifier function_name, int pos, | 910 PreParserIdentifier function_name, int pos, |
911 const PreParserFormalParameters& parameters, FunctionKind kind, | 911 const PreParserFormalParameters& parameters, FunctionKind kind, |
912 FunctionLiteral::FunctionType function_type, bool* ok); | 912 FunctionLiteral::FunctionType function_type, bool* ok); |
913 | 913 |
| 914 bool AllowsLazyParsingWithoutUnresolvedVariables() const { return false; } |
| 915 |
914 V8_INLINE LazyParsingResult SkipLazyFunctionBody( | 916 V8_INLINE LazyParsingResult SkipLazyFunctionBody( |
915 int* materialized_literal_count, int* expected_property_count, | 917 int* materialized_literal_count, int* expected_property_count, |
916 bool track_unresolved_variables, bool may_abort, bool* ok) { | 918 bool track_unresolved_variables, bool may_abort, bool* ok) { |
917 UNREACHABLE(); | 919 UNREACHABLE(); |
918 return kLazyParsingComplete; | 920 return kLazyParsingComplete; |
919 } | 921 } |
920 Expression ParseFunctionLiteral( | 922 Expression ParseFunctionLiteral( |
921 Identifier name, Scanner::Location function_name_location, | 923 Identifier name, Scanner::Location function_name_location, |
922 FunctionNameValidity function_name_validity, FunctionKind kind, | 924 FunctionNameValidity function_name_validity, FunctionKind kind, |
923 int function_token_pos, FunctionLiteral::FunctionType function_type, | 925 int function_token_pos, FunctionLiteral::FunctionType function_type, |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 function_state_->NextMaterializedLiteralIndex(); | 1543 function_state_->NextMaterializedLiteralIndex(); |
1542 function_state_->NextMaterializedLiteralIndex(); | 1544 function_state_->NextMaterializedLiteralIndex(); |
1543 } | 1545 } |
1544 return EmptyExpression(); | 1546 return EmptyExpression(); |
1545 } | 1547 } |
1546 | 1548 |
1547 } // namespace internal | 1549 } // namespace internal |
1548 } // namespace v8 | 1550 } // namespace v8 |
1549 | 1551 |
1550 #endif // V8_PARSING_PREPARSER_H | 1552 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |