| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 V8_INLINE void RewriteNonPattern(Type::ExpressionClassifier* classifier, | 658 V8_INLINE void RewriteNonPattern(Type::ExpressionClassifier* classifier, |
| 659 bool* ok); | 659 bool* ok); |
| 660 | 660 |
| 661 V8_INLINE Zone* zone() const; | 661 V8_INLINE Zone* zone() const; |
| 662 | 662 |
| 663 V8_INLINE ZoneList<Expression*>* GetNonPatternList() const; | 663 V8_INLINE ZoneList<Expression*>* GetNonPatternList() const; |
| 664 | 664 |
| 665 Expression* RewriteYieldStar( | 665 Expression* RewriteYieldStar( |
| 666 Expression* generator, Expression* expression, int pos); | 666 Expression* generator, Expression* expression, int pos); |
| 667 | 667 |
| 668 Expression* RewriteInstanceof(Expression* lhs, Expression* rhs, int pos); |
| 669 |
| 668 private: | 670 private: |
| 669 Parser* parser_; | 671 Parser* parser_; |
| 670 | 672 |
| 671 void BuildIteratorClose( | 673 void BuildIteratorClose( |
| 672 ZoneList<Statement*>* statements, Variable* iterator, | 674 ZoneList<Statement*>* statements, Variable* iterator, |
| 673 Expression* input, Variable* output); | 675 Expression* input, Variable* output); |
| 674 void BuildIteratorCloseForCompletion( | 676 void BuildIteratorCloseForCompletion( |
| 675 ZoneList<Statement*>* statements, Variable* iterator, | 677 ZoneList<Statement*>* statements, Variable* iterator, |
| 676 Variable* body_threw); | 678 Variable* body_threw); |
| 679 Statement* CheckCallable(Variable* var, Expression* error); |
| 677 }; | 680 }; |
| 678 | 681 |
| 679 | 682 |
| 680 class Parser : public ParserBase<ParserTraits> { | 683 class Parser : public ParserBase<ParserTraits> { |
| 681 public: | 684 public: |
| 682 explicit Parser(ParseInfo* info); | 685 explicit Parser(ParseInfo* info); |
| 683 ~Parser() { | 686 ~Parser() { |
| 684 delete reusable_preparser_; | 687 delete reusable_preparser_; |
| 685 reusable_preparser_ = NULL; | 688 reusable_preparser_ = NULL; |
| 686 delete cached_parse_data_; | 689 delete cached_parse_data_; |
| (...skipping 539 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 |