| 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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 | 644 |
| 645 // Rewrite all DestructuringAssignments in the current FunctionState. | 645 // Rewrite all DestructuringAssignments in the current FunctionState. |
| 646 V8_INLINE void RewriteDestructuringAssignments(); | 646 V8_INLINE void RewriteDestructuringAssignments(); |
| 647 | 647 |
| 648 V8_INLINE void QueueDestructuringAssignmentForRewriting( | 648 V8_INLINE void QueueDestructuringAssignmentForRewriting( |
| 649 Expression* assignment); | 649 Expression* assignment); |
| 650 | 650 |
| 651 void SetFunctionNameFromPropertyName(ObjectLiteralProperty* property, | 651 void SetFunctionNameFromPropertyName(ObjectLiteralProperty* property, |
| 652 const AstRawString* name); | 652 const AstRawString* name); |
| 653 | 653 |
| 654 // Rewrite expressions | 654 // Rewrite expressions that are not used as patterns |
| 655 V8_INLINE Expression* RewriteExpression( | 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* RewriteObjectLiteralProperty( | 657 V8_INLINE ObjectLiteralProperty* RewriteObjectLiteralProperty( |
| 658 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, | 658 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, |
| 659 bool* ok); | 659 bool* ok); |
| 660 | 660 |
| 661 private: | 661 private: |
| 662 Parser* parser_; | 662 Parser* parser_; |
| 663 }; | 663 }; |
| 664 | 664 |
| 665 | 665 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 Expression* SpreadCall(Expression* function, | 1003 Expression* SpreadCall(Expression* function, |
| 1004 ZoneList<v8::internal::Expression*>* args, int pos); | 1004 ZoneList<v8::internal::Expression*>* args, int pos); |
| 1005 Expression* SpreadCallNew(Expression* function, | 1005 Expression* SpreadCallNew(Expression* function, |
| 1006 ZoneList<v8::internal::Expression*>* args, int pos); | 1006 ZoneList<v8::internal::Expression*>* args, int pos); |
| 1007 | 1007 |
| 1008 void SetLanguageMode(Scope* scope, LanguageMode mode); | 1008 void SetLanguageMode(Scope* scope, LanguageMode mode); |
| 1009 void RaiseLanguageMode(LanguageMode mode); | 1009 void RaiseLanguageMode(LanguageMode mode); |
| 1010 | 1010 |
| 1011 V8_INLINE void RewriteDestructuringAssignments(); | 1011 V8_INLINE void RewriteDestructuringAssignments(); |
| 1012 | 1012 |
| 1013 V8_INLINE Expression* RewriteExpression( | 1013 V8_INLINE Expression* RewriteNonPattern( |
| 1014 Expression* expr, const ExpressionClassifier* classifier, bool* ok); | 1014 Expression* expr, const ExpressionClassifier* classifier, bool* ok); |
| 1015 V8_INLINE ObjectLiteralProperty* RewriteObjectLiteralProperty( | 1015 V8_INLINE ObjectLiteralProperty* RewriteObjectLiteralProperty( |
| 1016 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, | 1016 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, |
| 1017 bool* ok); | 1017 bool* ok); |
| 1018 | 1018 |
| 1019 friend class InitializerRewriter; | 1019 friend class InitializerRewriter; |
| 1020 void RewriteParameterInitializer(Expression* expr, Scope* scope); | 1020 void RewriteParameterInitializer(Expression* expr, Scope* scope); |
| 1021 | 1021 |
| 1022 Scanner scanner_; | 1022 Scanner scanner_; |
| 1023 PreParser* reusable_preparser_; | 1023 PreParser* reusable_preparser_; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 | 1205 |
| 1206 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1206 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1207 return parser_->ParseDoExpression(ok); | 1207 return parser_->ParseDoExpression(ok); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 | 1210 |
| 1211 } // namespace internal | 1211 } // namespace internal |
| 1212 } // namespace v8 | 1212 } // namespace v8 |
| 1213 | 1213 |
| 1214 #endif // V8_PARSING_PARSER_H_ | 1214 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |