| 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/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 // Rewrite expressions that are not used as patterns | 654 // Rewrite expressions that are not used as patterns |
| 655 V8_INLINE Expression* RewriteNonPattern( | 655 V8_INLINE Expression* RewriteNonPattern( |
| 656 Expression* expr, const ExpressionClassifier* classifier, bool* ok); | 656 Expression* expr, const ExpressionClassifier* classifier, bool* ok); |
| 657 V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( | 657 V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( |
| 658 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, | 658 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, |
| 659 bool* ok); | 659 bool* ok); |
| 660 | 660 |
| 661 Expression* RewriteYieldStar( | 661 Expression* RewriteYieldStar( |
| 662 Expression* generator, Expression* expression, int pos); | 662 Expression* generator, Expression* expression, int pos); |
| 663 | 663 |
| 664 Expression* RewriteInstanceof(Expression* lhs, Expression* rhs, int pos); |
| 665 |
| 664 private: | 666 private: |
| 665 Parser* parser_; | 667 Parser* parser_; |
| 666 | 668 |
| 667 void BuildIteratorClose( | 669 void BuildIteratorClose( |
| 668 ZoneList<Statement*>* statements, Variable* iterator, | 670 ZoneList<Statement*>* statements, Variable* iterator, |
| 669 Expression* input, Variable* output); | 671 Expression* input, Variable* output); |
| 670 void BuildIteratorCloseForCompletion( | 672 void BuildIteratorCloseForCompletion( |
| 671 ZoneList<Statement*>* statements, Variable* iterator, | 673 ZoneList<Statement*>* statements, Variable* iterator, |
| 672 Variable* body_threw); | 674 Variable* body_threw); |
| 675 Statement* CheckCallable(Variable* var, Expression* error); |
| 673 }; | 676 }; |
| 674 | 677 |
| 675 | 678 |
| 676 class Parser : public ParserBase<ParserTraits> { | 679 class Parser : public ParserBase<ParserTraits> { |
| 677 public: | 680 public: |
| 678 explicit Parser(ParseInfo* info); | 681 explicit Parser(ParseInfo* info); |
| 679 ~Parser() { | 682 ~Parser() { |
| 680 delete reusable_preparser_; | 683 delete reusable_preparser_; |
| 681 reusable_preparser_ = NULL; | 684 reusable_preparser_ = NULL; |
| 682 delete cached_parse_data_; | 685 delete cached_parse_data_; |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 | 1229 |
| 1227 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1230 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1228 return parser_->ParseDoExpression(ok); | 1231 return parser_->ParseDoExpression(ok); |
| 1229 } | 1232 } |
| 1230 | 1233 |
| 1231 | 1234 |
| 1232 } // namespace internal | 1235 } // namespace internal |
| 1233 } // namespace v8 | 1236 } // namespace v8 |
| 1234 | 1237 |
| 1235 #endif // V8_PARSING_PARSER_H_ | 1238 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |