Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: src/parsing/parser.h

Issue 2505453003: Inline ParseFunctionWithPreParser into SkipFunction (Closed)
Patch Set: merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // Skip over a lazy function, either using cached data if we have it, or 529 // Skip over a lazy function, either using cached data if we have it, or
530 // by parsing the function with PreParser. Consumes the ending }. 530 // by parsing the function with PreParser. Consumes the ending }.
531 // If may_abort == true, the (pre-)parser may decide to abort skipping 531 // If may_abort == true, the (pre-)parser may decide to abort skipping
532 // in order to force the function to be eagerly parsed, after all. 532 // in order to force the function to be eagerly parsed, after all.
533 LazyParsingResult SkipFunction( 533 LazyParsingResult SkipFunction(
534 FunctionKind kind, DeclarationScope* function_scope, int* num_parameters, 534 FunctionKind kind, DeclarationScope* function_scope, int* num_parameters,
535 int* function_length, bool* has_duplicate_parameters, 535 int* function_length, bool* has_duplicate_parameters,
536 int* materialized_literal_count, int* expected_property_count, 536 int* materialized_literal_count, int* expected_property_count,
537 bool is_inner_function, bool may_abort, bool* ok); 537 bool is_inner_function, bool may_abort, bool* ok);
538 538
539 PreParser::PreParseResult ParseFunctionWithPreParser(FunctionKind kind,
540 DeclarationScope* scope,
541 bool is_inner_function,
542 bool may_abort);
543
544 Block* BuildParameterInitializationBlock( 539 Block* BuildParameterInitializationBlock(
545 const ParserFormalParameters& parameters, bool* ok); 540 const ParserFormalParameters& parameters, bool* ok);
546 Block* BuildRejectPromiseOnException(Block* block, bool* ok); 541 Block* BuildRejectPromiseOnException(Block* block, bool* ok);
547 542
548 // Consumes the ending }. 543 // Consumes the ending }.
549 ZoneList<Statement*>* ParseEagerFunctionBody( 544 ZoneList<Statement*>* ParseEagerFunctionBody(
550 const AstRawString* function_name, int pos, 545 const AstRawString* function_name, int pos,
551 const ParserFormalParameters& parameters, FunctionKind kind, 546 const ParserFormalParameters& parameters, FunctionKind kind,
552 FunctionLiteral::FunctionType function_type, bool* ok); 547 FunctionLiteral::FunctionType function_type, bool* ok);
553 548
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 1187
1193 private: 1188 private:
1194 ParserTarget** variable_; 1189 ParserTarget** variable_;
1195 ParserTarget* previous_; 1190 ParserTarget* previous_;
1196 }; 1191 };
1197 1192
1198 } // namespace internal 1193 } // namespace internal
1199 } // namespace v8 1194 } // namespace v8
1200 1195
1201 #endif // V8_PARSING_PARSER_H_ 1196 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698