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

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

Issue 2339453002: [parser] Refactor of Parse*Statement*, part 7 (Closed)
Patch Set: Change in comment 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const DeclarationParsingResult::Declaration* declaration, 277 const DeclarationParsingResult::Declaration* declaration,
278 ZoneList<const AstRawString*>* names, bool* ok); 278 ZoneList<const AstRawString*>* names, bool* ok);
279 ZoneList<const AstRawString*>* DeclareLabel( 279 ZoneList<const AstRawString*>* DeclareLabel(
280 ZoneList<const AstRawString*>* labels, VariableProxy* expr, bool* ok); 280 ZoneList<const AstRawString*>* labels, VariableProxy* expr, bool* ok);
281 bool ContainsLabel(ZoneList<const AstRawString*>* labels, 281 bool ContainsLabel(ZoneList<const AstRawString*>* labels,
282 const AstRawString* label); 282 const AstRawString* label);
283 Expression* RewriteReturn(Expression* return_value, int pos); 283 Expression* RewriteReturn(Expression* return_value, int pos);
284 Statement* RewriteSwitchStatement(Expression* tag, 284 Statement* RewriteSwitchStatement(Expression* tag,
285 SwitchStatement* switch_statement, 285 SwitchStatement* switch_statement,
286 ZoneList<CaseClause*>* cases, Scope* scope); 286 ZoneList<CaseClause*>* cases, Scope* scope);
287 void RewriteCatchPattern(CatchInfo* catch_info, bool* ok);
288 void ValidateCatchBlock(const CatchInfo& catch_info, bool* ok);
289 Statement* RewriteTryStatement(Block* try_block, Block* catch_block,
290 Block* finally_block,
291 const CatchInfo& catch_info, int pos);
287 292
288 Statement* DeclareFunction(const AstRawString* variable_name, 293 Statement* DeclareFunction(const AstRawString* variable_name,
289 FunctionLiteral* function, int pos, 294 FunctionLiteral* function, int pos,
290 bool is_generator, bool is_async, 295 bool is_generator, bool is_async,
291 ZoneList<const AstRawString*>* names, bool* ok); 296 ZoneList<const AstRawString*>* names, bool* ok);
292 297
293 Expression* ParseYieldStarExpression(bool* ok); 298 Expression* ParseYieldStarExpression(bool* ok);
294 299
295 class PatternRewriter final : public AstVisitor<PatternRewriter> { 300 class PatternRewriter final : public AstVisitor<PatternRewriter> {
296 public: 301 public:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 const DeclarationDescriptor* descriptor_; 372 const DeclarationDescriptor* descriptor_;
368 ZoneList<const AstRawString*>* names_; 373 ZoneList<const AstRawString*>* names_;
369 Expression* current_value_; 374 Expression* current_value_;
370 int recursion_level_; 375 int recursion_level_;
371 bool* ok_; 376 bool* ok_;
372 377
373 DEFINE_AST_VISITOR_MEMBERS_WITHOUT_STACKOVERFLOW() 378 DEFINE_AST_VISITOR_MEMBERS_WITHOUT_STACKOVERFLOW()
374 }; 379 };
375 380
376 Statement* ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok); 381 Statement* ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok);
377 Expression* MakeCatchContext(Handle<String> id, VariableProxy* value);
378 TryStatement* ParseTryStatement(bool* ok);
379 382
380 // !%_IsJSReceiver(result = iterator.next()) && 383 // !%_IsJSReceiver(result = iterator.next()) &&
381 // %ThrowIteratorResultNotAnObject(result) 384 // %ThrowIteratorResultNotAnObject(result)
382 Expression* BuildIteratorNextResult(Expression* iterator, Variable* result, 385 Expression* BuildIteratorNextResult(Expression* iterator, Variable* result,
383 int pos); 386 int pos);
384 387
385 Expression* GetIterator(Expression* iterable, int pos); 388 Expression* GetIterator(Expression* iterable, int pos);
386 389
387 // Initialize the components of a for-in / for-of statement. 390 // Initialize the components of a for-in / for-of statement.
388 Statement* InitializeForEachStatement(ForEachStatement* stmt, 391 Statement* InitializeForEachStatement(ForEachStatement* stmt,
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1076
1074 #ifdef DEBUG 1077 #ifdef DEBUG
1075 void Print(AstNode* node); 1078 void Print(AstNode* node);
1076 #endif // DEBUG 1079 #endif // DEBUG
1077 }; 1080 };
1078 1081
1079 } // namespace internal 1082 } // namespace internal
1080 } // namespace v8 1083 } // namespace v8
1081 1084
1082 #endif // V8_PARSING_PARSER_H_ 1085 #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