| 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_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
| 6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/base/compiler-specific.h" | 10 #include "src/base/compiler-specific.h" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 // Skip over a lazy function, either using cached data if we have it, or | 527 // Skip over a lazy function, either using cached data if we have it, or |
| 528 // by parsing the function with PreParser. Consumes the ending }. | 528 // by parsing the function with PreParser. Consumes the ending }. |
| 529 // If may_abort == true, the (pre-)parser may decide to abort skipping | 529 // If may_abort == true, the (pre-)parser may decide to abort skipping |
| 530 // in order to force the function to be eagerly parsed, after all. | 530 // in order to force the function to be eagerly parsed, after all. |
| 531 LazyParsingResult SkipFunction( | 531 LazyParsingResult SkipFunction( |
| 532 FunctionKind kind, DeclarationScope* function_scope, int* num_parameters, | 532 FunctionKind kind, DeclarationScope* function_scope, int* num_parameters, |
| 533 int* function_length, bool* has_duplicate_parameters, | 533 int* function_length, bool* has_duplicate_parameters, |
| 534 int* materialized_literal_count, int* expected_property_count, | 534 int* materialized_literal_count, int* expected_property_count, |
| 535 bool is_inner_function, bool may_abort, bool* ok); | 535 bool is_inner_function, bool may_abort, bool* ok); |
| 536 | 536 |
| 537 PreParser::PreParseResult ParseFunctionWithPreParser(FunctionKind kind, | |
| 538 DeclarationScope* scope, | |
| 539 bool is_inner_function, | |
| 540 bool may_abort); | |
| 541 | |
| 542 Block* BuildParameterInitializationBlock( | 537 Block* BuildParameterInitializationBlock( |
| 543 const ParserFormalParameters& parameters, bool* ok); | 538 const ParserFormalParameters& parameters, bool* ok); |
| 544 Block* BuildRejectPromiseOnException(Block* block, bool* ok); | 539 Block* BuildRejectPromiseOnException(Block* block, bool* ok); |
| 545 | 540 |
| 546 // Consumes the ending }. | 541 // Consumes the ending }. |
| 547 ZoneList<Statement*>* ParseEagerFunctionBody( | 542 ZoneList<Statement*>* ParseEagerFunctionBody( |
| 548 const AstRawString* function_name, int pos, | 543 const AstRawString* function_name, int pos, |
| 549 const ParserFormalParameters& parameters, FunctionKind kind, | 544 const ParserFormalParameters& parameters, FunctionKind kind, |
| 550 FunctionLiteral::FunctionType function_type, bool* ok); | 545 FunctionLiteral::FunctionType function_type, bool* ok); |
| 551 | 546 |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 | 1186 |
| 1192 private: | 1187 private: |
| 1193 ParserTarget** variable_; | 1188 ParserTarget** variable_; |
| 1194 ParserTarget* previous_; | 1189 ParserTarget* previous_; |
| 1195 }; | 1190 }; |
| 1196 | 1191 |
| 1197 } // namespace internal | 1192 } // namespace internal |
| 1198 } // namespace v8 | 1193 } // namespace v8 |
| 1199 | 1194 |
| 1200 #endif // V8_PARSING_PARSER_H_ | 1195 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |