| 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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 V8_INLINE Expression* SpreadCall(Expression* function, | 633 V8_INLINE Expression* SpreadCall(Expression* function, |
| 634 ZoneList<v8::internal::Expression*>* args, | 634 ZoneList<v8::internal::Expression*>* args, |
| 635 int pos); | 635 int pos); |
| 636 V8_INLINE Expression* SpreadCallNew(Expression* function, | 636 V8_INLINE Expression* SpreadCallNew(Expression* function, |
| 637 ZoneList<v8::internal::Expression*>* args, | 637 ZoneList<v8::internal::Expression*>* args, |
| 638 int pos); | 638 int pos); |
| 639 | 639 |
| 640 // Rewrite all DestructuringAssignments in the current FunctionState. | 640 // Rewrite all DestructuringAssignments in the current FunctionState. |
| 641 V8_INLINE void RewriteDestructuringAssignments(); | 641 V8_INLINE void RewriteDestructuringAssignments(); |
| 642 | 642 |
| 643 V8_INLINE Expression* RewriteAssignExponentiation(Expression* left, |
| 644 Expression* right, int pos); |
| 645 |
| 643 V8_INLINE void QueueDestructuringAssignmentForRewriting( | 646 V8_INLINE void QueueDestructuringAssignmentForRewriting( |
| 644 Expression* assignment); | 647 Expression* assignment); |
| 645 | 648 |
| 646 void SetFunctionNameFromPropertyName(ObjectLiteralProperty* property, | 649 void SetFunctionNameFromPropertyName(ObjectLiteralProperty* property, |
| 647 const AstRawString* name); | 650 const AstRawString* name); |
| 648 | 651 |
| 649 void SetFunctionNameFromIdentifierRef(Expression* value, | 652 void SetFunctionNameFromIdentifierRef(Expression* value, |
| 650 Expression* identifier); | 653 Expression* identifier); |
| 651 | 654 |
| 652 // Rewrite expressions that are not used as patterns | 655 // Rewrite expressions that are not used as patterns |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 Expression* SpreadCall(Expression* function, | 1016 Expression* SpreadCall(Expression* function, |
| 1014 ZoneList<v8::internal::Expression*>* args, int pos); | 1017 ZoneList<v8::internal::Expression*>* args, int pos); |
| 1015 Expression* SpreadCallNew(Expression* function, | 1018 Expression* SpreadCallNew(Expression* function, |
| 1016 ZoneList<v8::internal::Expression*>* args, int pos); | 1019 ZoneList<v8::internal::Expression*>* args, int pos); |
| 1017 | 1020 |
| 1018 void SetLanguageMode(Scope* scope, LanguageMode mode); | 1021 void SetLanguageMode(Scope* scope, LanguageMode mode); |
| 1019 void RaiseLanguageMode(LanguageMode mode); | 1022 void RaiseLanguageMode(LanguageMode mode); |
| 1020 | 1023 |
| 1021 V8_INLINE void RewriteDestructuringAssignments(); | 1024 V8_INLINE void RewriteDestructuringAssignments(); |
| 1022 | 1025 |
| 1026 V8_INLINE Expression* RewriteAssignExponentiation(Expression* left, |
| 1027 Expression* right, int pos); |
| 1028 |
| 1023 friend class NonPatternRewriter; | 1029 friend class NonPatternRewriter; |
| 1024 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit); | 1030 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit); |
| 1025 | 1031 |
| 1026 V8_INLINE Expression* RewriteNonPattern( | 1032 V8_INLINE Expression* RewriteNonPattern( |
| 1027 Expression* expr, const ExpressionClassifier* classifier, bool* ok); | 1033 Expression* expr, const ExpressionClassifier* classifier, bool* ok); |
| 1028 V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( | 1034 V8_INLINE ObjectLiteralProperty* RewriteNonPatternObjectLiteralProperty( |
| 1029 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, | 1035 ObjectLiteralProperty* property, const ExpressionClassifier* classifier, |
| 1030 bool* ok); | 1036 bool* ok); |
| 1031 | 1037 |
| 1032 friend class InitializerRewriter; | 1038 friend class InitializerRewriter; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 | 1224 |
| 1219 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1225 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1220 return parser_->ParseDoExpression(ok); | 1226 return parser_->ParseDoExpression(ok); |
| 1221 } | 1227 } |
| 1222 | 1228 |
| 1223 | 1229 |
| 1224 } // namespace internal | 1230 } // namespace internal |
| 1225 } // namespace v8 | 1231 } // namespace v8 |
| 1226 | 1232 |
| 1227 #endif // V8_PARSING_PARSER_H_ | 1233 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |