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

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

Issue 2519333005: Revert of [parser] Fix scopes in rewriting of for-of and destructuring assignments. (Closed)
Patch Set: Created 4 years 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 | « src/ast/scopes.cc ('k') | 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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 Expression* BuildCreateJSGeneratorObject(int pos, FunctionKind kind); 633 Expression* BuildCreateJSGeneratorObject(int pos, FunctionKind kind);
634 Expression* BuildResolvePromise(Expression* value, int pos); 634 Expression* BuildResolvePromise(Expression* value, int pos);
635 Expression* BuildRejectPromise(Expression* value, int pos); 635 Expression* BuildRejectPromise(Expression* value, int pos);
636 Variable* PromiseVariable(); 636 Variable* PromiseVariable();
637 637
638 // Generic AST generator for throwing errors from compiled code. 638 // Generic AST generator for throwing errors from compiled code.
639 Expression* NewThrowError(Runtime::FunctionId function_id, 639 Expression* NewThrowError(Runtime::FunctionId function_id,
640 MessageTemplate::Template message, 640 MessageTemplate::Template message,
641 const AstRawString* arg, int pos); 641 const AstRawString* arg, int pos);
642 642
643 void FinalizeIteratorUse(Scope* use_scope, Variable* completion, 643 void FinalizeIteratorUse(Variable* completion, Expression* condition,
644 Expression* condition, Variable* iter, 644 Variable* iter, Block* iterator_use, Block* result);
645 Block* iterator_use, Block* result);
646 645
647 Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion, 646 Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion,
648 int pos); 647 int pos);
649 void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator, 648 void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator,
650 Variable* input, Variable* output); 649 Variable* input, Variable* output);
651 void BuildIteratorCloseForCompletion(Scope* scope, 650 void BuildIteratorCloseForCompletion(ZoneList<Statement*>* statements,
652 ZoneList<Statement*>* statements,
653 Variable* iterator, 651 Variable* iterator,
654 Expression* completion); 652 Expression* completion);
655 Statement* CheckCallable(Variable* var, Expression* error, int pos); 653 Statement* CheckCallable(Variable* var, Expression* error, int pos);
656 654
657 V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos); 655 V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos);
658 V8_INLINE void PrepareAsyncFunctionBody(ZoneList<Statement*>* body, 656 V8_INLINE void PrepareAsyncFunctionBody(ZoneList<Statement*>* body,
659 FunctionKind kind, int pos); 657 FunctionKind kind, int pos);
660 V8_INLINE void RewriteAsyncFunctionBody(ZoneList<Statement*>* body, 658 V8_INLINE void RewriteAsyncFunctionBody(ZoneList<Statement*>* body,
661 Block* block, 659 Block* block,
662 Expression* return_value, bool* ok); 660 Expression* return_value, bool* ok);
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 1186
1189 private: 1187 private:
1190 ParserTarget** variable_; 1188 ParserTarget** variable_;
1191 ParserTarget* previous_; 1189 ParserTarget* previous_;
1192 }; 1190 };
1193 1191
1194 } // namespace internal 1192 } // namespace internal
1195 } // namespace v8 1193 } // namespace v8
1196 1194
1197 #endif // V8_PARSING_PARSER_H_ 1195 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698