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

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

Issue 2302183002: Remove unused function_name param from DesugarAsyncFunctionBody (Closed)
Patch Set: Created 4 years, 3 months 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/parsing/parser-base.h" 10 #include "src/parsing/parser-base.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 Statement* body, int each_keyword_pos); 427 Statement* body, int each_keyword_pos);
428 Statement* InitializeForOfStatement(ForOfStatement* stmt, Expression* each, 428 Statement* InitializeForOfStatement(ForOfStatement* stmt, Expression* each,
429 Expression* iterable, Statement* body, 429 Expression* iterable, Statement* body,
430 bool finalize, 430 bool finalize,
431 int next_result_pos = kNoSourcePosition); 431 int next_result_pos = kNoSourcePosition);
432 Statement* DesugarLexicalBindingsInForStatement( 432 Statement* DesugarLexicalBindingsInForStatement(
433 Scope* inner_scope, VariableMode mode, 433 Scope* inner_scope, VariableMode mode,
434 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init, 434 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init,
435 Expression* cond, Statement* next, Statement* body, bool* ok); 435 Expression* cond, Statement* next, Statement* body, bool* ok);
436 436
437 void DesugarAsyncFunctionBody(const AstRawString* function_name, Scope* scope, 437 void DesugarAsyncFunctionBody(Scope* scope, ZoneList<Statement*>* body,
438 ZoneList<Statement*>* body,
439 FunctionKind kind, FunctionBodyType type, 438 FunctionKind kind, FunctionBodyType type,
440 bool accept_IN, int pos, bool* ok); 439 bool accept_IN, int pos, bool* ok);
441 440
442 void RewriteDoExpression(Expression* expr, bool* ok); 441 void RewriteDoExpression(Expression* expr, bool* ok);
443 442
444 FunctionLiteral* ParseFunctionLiteral( 443 FunctionLiteral* ParseFunctionLiteral(
445 const AstRawString* name, Scanner::Location function_name_location, 444 const AstRawString* name, Scanner::Location function_name_location,
446 FunctionNameValidity function_name_validity, FunctionKind kind, 445 FunctionNameValidity function_name_validity, FunctionKind kind,
447 int function_token_position, FunctionLiteral::FunctionType type, 446 int function_token_position, FunctionLiteral::FunctionType type,
448 LanguageMode language_mode, bool* ok); 447 LanguageMode language_mode, bool* ok);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 void AddTemplateSpan(TemplateLiteralState* state, bool tail); 560 void AddTemplateSpan(TemplateLiteralState* state, bool tail);
562 void AddTemplateExpression(TemplateLiteralState* state, 561 void AddTemplateExpression(TemplateLiteralState* state,
563 Expression* expression); 562 Expression* expression);
564 Expression* CloseTemplateLiteral(TemplateLiteralState* state, int start, 563 Expression* CloseTemplateLiteral(TemplateLiteralState* state, int start,
565 Expression* tag); 564 Expression* tag);
566 uint32_t ComputeTemplateLiteralHash(const TemplateLiteral* lit); 565 uint32_t ComputeTemplateLiteralHash(const TemplateLiteral* lit);
567 566
568 void ParseAsyncArrowSingleExpressionBody(ZoneList<Statement*>* body, 567 void ParseAsyncArrowSingleExpressionBody(ZoneList<Statement*>* body,
569 bool accept_IN, 568 bool accept_IN,
570 int pos, bool* ok) { 569 int pos, bool* ok) {
571 DesugarAsyncFunctionBody( 570 DesugarAsyncFunctionBody(scope(), body, kAsyncArrowFunction,
572 ast_value_factory()->empty_string(), scope(), body, kAsyncArrowFunction, 571 FunctionBodyType::kSingleExpression, accept_IN,
573 FunctionBodyType::kSingleExpression, accept_IN, pos, ok); 572 pos, ok);
574 } 573 }
575 574
576 ZoneList<Expression*>* PrepareSpreadArguments(ZoneList<Expression*>* list); 575 ZoneList<Expression*>* PrepareSpreadArguments(ZoneList<Expression*>* list);
577 Expression* SpreadCall(Expression* function, ZoneList<Expression*>* args, 576 Expression* SpreadCall(Expression* function, ZoneList<Expression*>* args,
578 int pos); 577 int pos);
579 Expression* SpreadCallNew(Expression* function, ZoneList<Expression*>* args, 578 Expression* SpreadCallNew(Expression* function, ZoneList<Expression*>* args,
580 int pos); 579 int pos);
581 580
582 void SetLanguageMode(Scope* scope, LanguageMode mode); 581 void SetLanguageMode(Scope* scope, LanguageMode mode);
583 void RaiseLanguageMode(LanguageMode mode); 582 void RaiseLanguageMode(LanguageMode mode);
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 static const int kLiteralTypeSlot = 0; 1054 static const int kLiteralTypeSlot = 0;
1056 static const int kElementsSlot = 1; 1055 static const int kElementsSlot = 1;
1057 1056
1058 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 1057 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
1059 }; 1058 };
1060 1059
1061 } // namespace internal 1060 } // namespace internal
1062 } // namespace v8 1061 } // namespace v8
1063 1062
1064 #endif // V8_PARSING_PARSER_H_ 1063 #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