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

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

Issue 2351233002: [parser] Refactor of Parse*Statement*, part 8 (Closed)
Patch Set: The real patch 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') | src/parsing/parser.cc » ('J')
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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 Expression* GetIterator(Expression* iterable, int pos); 394 Expression* GetIterator(Expression* iterable, int pos);
395 395
396 // Initialize the components of a for-in / for-of statement. 396 // Initialize the components of a for-in / for-of statement.
397 Statement* InitializeForEachStatement(ForEachStatement* stmt, 397 Statement* InitializeForEachStatement(ForEachStatement* stmt,
398 Expression* each, Expression* subject, 398 Expression* each, Expression* subject,
399 Statement* body, int each_keyword_pos); 399 Statement* body, int each_keyword_pos);
400 Statement* InitializeForOfStatement(ForOfStatement* stmt, Expression* each, 400 Statement* InitializeForOfStatement(ForOfStatement* stmt, Expression* each,
401 Expression* iterable, Statement* body, 401 Expression* iterable, Statement* body,
402 bool finalize, 402 bool finalize,
403 int next_result_pos = kNoSourcePosition); 403 int next_result_pos = kNoSourcePosition);
404 Block* RewriteForVarInLegacy(ForInfo* for_info);
405 std::pair<Block*, Expression*> DesugarBindingInForEachStatement(
406 ForInfo* for_info, bool* ok);
407 Block* CreateForEachStatementTDZ(Block* init_block, ForInfo* for_info,
408 bool* ok);
409
404 Statement* DesugarLexicalBindingsInForStatement( 410 Statement* DesugarLexicalBindingsInForStatement(
405 Scope* inner_scope, VariableMode mode, 411 ForStatement* loop, Statement* init, Expression* cond, Statement* next,
406 ZoneList<const AstRawString*>* names, ForStatement* loop, Statement* init, 412 Statement* body, Scope* inner_scope, ForInfo* for_info, bool* ok);
407 Expression* cond, Statement* next, Statement* body, bool* ok);
408 413
409 void DesugarAsyncFunctionBody(Scope* scope, ZoneList<Statement*>* body, 414 void DesugarAsyncFunctionBody(Scope* scope, ZoneList<Statement*>* body,
410 FunctionKind kind, FunctionBodyType type, 415 FunctionKind kind, FunctionBodyType type,
411 bool accept_IN, int pos, bool* ok); 416 bool accept_IN, int pos, bool* ok);
412 417
413 Expression* RewriteDoExpression(Block* body, int pos, bool* ok); 418 Expression* RewriteDoExpression(Block* body, int pos, bool* ok);
414 419
415 FunctionLiteral* ParseFunctionLiteral( 420 FunctionLiteral* ParseFunctionLiteral(
416 const AstRawString* name, Scanner::Location function_name_location, 421 const AstRawString* name, Scanner::Location function_name_location,
417 FunctionNameValidity function_name_validity, FunctionKind kind, 422 FunctionNameValidity function_name_validity, FunctionKind kind,
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 int total_preparse_skipped_; 1084 int total_preparse_skipped_;
1080 HistogramTimer* pre_parse_timer_; 1085 HistogramTimer* pre_parse_timer_;
1081 1086
1082 bool parsing_on_main_thread_; 1087 bool parsing_on_main_thread_;
1083 }; 1088 };
1084 1089
1085 } // namespace internal 1090 } // namespace internal
1086 } // namespace v8 1091 } // namespace v8
1087 1092
1088 #endif // V8_PARSING_PARSER_H_ 1093 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698