OLD | NEW |
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 Loading... |
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(Variable* completion, Expression* condition, | 643 void FinalizeIteratorUse(Scope* use_scope, Variable* completion, |
644 Variable* iter, Block* iterator_use, Block* result); | 644 Expression* condition, Variable* iter, |
| 645 Block* iterator_use, Block* result); |
645 | 646 |
646 Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion, | 647 Statement* FinalizeForOfStatement(ForOfStatement* loop, Variable* completion, |
647 int pos); | 648 int pos); |
648 void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator, | 649 void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator, |
649 Variable* input, Variable* output); | 650 Variable* input, Variable* output); |
650 void BuildIteratorCloseForCompletion(ZoneList<Statement*>* statements, | 651 void BuildIteratorCloseForCompletion(Scope* scope, |
| 652 ZoneList<Statement*>* statements, |
651 Variable* iterator, | 653 Variable* iterator, |
652 Expression* completion); | 654 Expression* completion); |
653 Statement* CheckCallable(Variable* var, Expression* error, int pos); | 655 Statement* CheckCallable(Variable* var, Expression* error, int pos); |
654 | 656 |
655 V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos); | 657 V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos); |
656 V8_INLINE void PrepareAsyncFunctionBody(ZoneList<Statement*>* body, | 658 V8_INLINE void PrepareAsyncFunctionBody(ZoneList<Statement*>* body, |
657 FunctionKind kind, int pos); | 659 FunctionKind kind, int pos); |
658 V8_INLINE void RewriteAsyncFunctionBody(ZoneList<Statement*>* body, | 660 V8_INLINE void RewriteAsyncFunctionBody(ZoneList<Statement*>* body, |
659 Block* block, | 661 Block* block, |
660 Expression* return_value, bool* ok); | 662 Expression* return_value, bool* ok); |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 | 1188 |
1187 private: | 1189 private: |
1188 ParserTarget** variable_; | 1190 ParserTarget** variable_; |
1189 ParserTarget* previous_; | 1191 ParserTarget* previous_; |
1190 }; | 1192 }; |
1191 | 1193 |
1192 } // namespace internal | 1194 } // namespace internal |
1193 } // namespace v8 | 1195 } // namespace v8 |
1194 | 1196 |
1195 #endif // V8_PARSING_PARSER_H_ | 1197 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |