| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 V8_INLINE Expression* SpreadCall(Expression* function, | 637 V8_INLINE Expression* SpreadCall(Expression* function, |
| 638 ZoneList<v8::internal::Expression*>* args, | 638 ZoneList<v8::internal::Expression*>* args, |
| 639 int pos); | 639 int pos); |
| 640 V8_INLINE Expression* SpreadCallNew(Expression* function, | 640 V8_INLINE Expression* SpreadCallNew(Expression* function, |
| 641 ZoneList<v8::internal::Expression*>* args, | 641 ZoneList<v8::internal::Expression*>* args, |
| 642 int pos); | 642 int pos); |
| 643 | 643 |
| 644 // Rewrite all DestructuringAssignments in the current FunctionState. | 644 // Rewrite all DestructuringAssignments in the current FunctionState. |
| 645 V8_INLINE void RewriteDestructuringAssignments(); | 645 V8_INLINE void RewriteDestructuringAssignments(); |
| 646 | 646 |
| 647 V8_INLINE Expression* RewriteExponentiation(Expression* left, |
| 648 Expression* right, |
| 649 Token::Value op, int pos); |
| 650 |
| 647 V8_INLINE void QueueDestructuringAssignmentForRewriting( | 651 V8_INLINE void QueueDestructuringAssignmentForRewriting( |
| 648 Expression* assignment); | 652 Expression* assignment); |
| 649 V8_INLINE void QueueNonPatternForRewriting(Expression* expr); | 653 V8_INLINE void QueueNonPatternForRewriting(Expression* expr); |
| 650 | 654 |
| 651 void SetFunctionNameFromPropertyName(ObjectLiteralProperty* property, | 655 void SetFunctionNameFromPropertyName(ObjectLiteralProperty* property, |
| 652 const AstRawString* name); | 656 const AstRawString* name); |
| 653 | 657 |
| 654 void SetFunctionNameFromIdentifierRef(Expression* value, | 658 void SetFunctionNameFromIdentifierRef(Expression* value, |
| 655 Expression* identifier); | 659 Expression* identifier); |
| 656 | 660 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 Expression* SpreadCall(Expression* function, | 1032 Expression* SpreadCall(Expression* function, |
| 1029 ZoneList<v8::internal::Expression*>* args, int pos); | 1033 ZoneList<v8::internal::Expression*>* args, int pos); |
| 1030 Expression* SpreadCallNew(Expression* function, | 1034 Expression* SpreadCallNew(Expression* function, |
| 1031 ZoneList<v8::internal::Expression*>* args, int pos); | 1035 ZoneList<v8::internal::Expression*>* args, int pos); |
| 1032 | 1036 |
| 1033 void SetLanguageMode(Scope* scope, LanguageMode mode); | 1037 void SetLanguageMode(Scope* scope, LanguageMode mode); |
| 1034 void RaiseLanguageMode(LanguageMode mode); | 1038 void RaiseLanguageMode(LanguageMode mode); |
| 1035 | 1039 |
| 1036 V8_INLINE void RewriteDestructuringAssignments(); | 1040 V8_INLINE void RewriteDestructuringAssignments(); |
| 1037 | 1041 |
| 1042 V8_INLINE Expression* RewriteExponentiation(Expression* left, |
| 1043 Expression* right, |
| 1044 Token::Value op, int pos); |
| 1045 |
| 1038 friend class NonPatternRewriter; | 1046 friend class NonPatternRewriter; |
| 1039 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit); | 1047 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit); |
| 1040 | 1048 |
| 1041 V8_INLINE void RewriteNonPattern(ExpressionClassifier* classifier, bool* ok); | 1049 V8_INLINE void RewriteNonPattern(ExpressionClassifier* classifier, bool* ok); |
| 1042 | 1050 |
| 1043 friend class InitializerRewriter; | 1051 friend class InitializerRewriter; |
| 1044 void RewriteParameterInitializer(Expression* expr, Scope* scope); | 1052 void RewriteParameterInitializer(Expression* expr, Scope* scope); |
| 1045 | 1053 |
| 1046 Scanner scanner_; | 1054 Scanner scanner_; |
| 1047 PreParser* reusable_preparser_; | 1055 PreParser* reusable_preparser_; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 | 1237 |
| 1230 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1238 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1231 return parser_->ParseDoExpression(ok); | 1239 return parser_->ParseDoExpression(ok); |
| 1232 } | 1240 } |
| 1233 | 1241 |
| 1234 | 1242 |
| 1235 } // namespace internal | 1243 } // namespace internal |
| 1236 } // namespace v8 | 1244 } // namespace v8 |
| 1237 | 1245 |
| 1238 #endif // V8_PARSING_PARSER_H_ | 1246 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |