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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 const AstRawString* name, int pos, | 566 const AstRawString* name, int pos, |
567 const ParserFormalParameters& parameters, FunctionKind kind, | 567 const ParserFormalParameters& parameters, FunctionKind kind, |
568 FunctionLiteral::FunctionType function_type, bool* ok); | 568 FunctionLiteral::FunctionType function_type, bool* ok); |
569 | 569 |
570 ClassLiteral* ParseClassLiteral(Type::ExpressionClassifier* classifier, | 570 ClassLiteral* ParseClassLiteral(Type::ExpressionClassifier* classifier, |
571 const AstRawString* name, | 571 const AstRawString* name, |
572 Scanner::Location class_name_location, | 572 Scanner::Location class_name_location, |
573 bool name_is_strict_reserved, int pos, | 573 bool name_is_strict_reserved, int pos, |
574 bool* ok); | 574 bool* ok); |
575 | 575 |
| 576 V8_INLINE void MarkCollectedTailCallExpressions(); |
576 V8_INLINE void MarkTailPosition(Expression* expression); | 577 V8_INLINE void MarkTailPosition(Expression* expression); |
577 | 578 |
578 V8_INLINE void CheckConflictingVarDeclarations(v8::internal::Scope* scope, | 579 V8_INLINE void CheckConflictingVarDeclarations(v8::internal::Scope* scope, |
579 bool* ok); | 580 bool* ok); |
580 | 581 |
581 class TemplateLiteral : public ZoneObject { | 582 class TemplateLiteral : public ZoneObject { |
582 public: | 583 public: |
583 TemplateLiteral(Zone* zone, int pos) | 584 TemplateLiteral(Zone* zone, int pos) |
584 : cooked_(8, zone), raw_(8, zone), expressions_(8, zone), pos_(pos) {} | 585 : cooked_(8, zone), raw_(8, zone), expressions_(8, zone), pos_(pos) {} |
585 | 586 |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 ZoneList<v8::internal::Expression*>* PrepareSpreadArguments( | 1042 ZoneList<v8::internal::Expression*>* PrepareSpreadArguments( |
1042 ZoneList<v8::internal::Expression*>* list); | 1043 ZoneList<v8::internal::Expression*>* list); |
1043 Expression* SpreadCall(Expression* function, | 1044 Expression* SpreadCall(Expression* function, |
1044 ZoneList<v8::internal::Expression*>* args, int pos); | 1045 ZoneList<v8::internal::Expression*>* args, int pos); |
1045 Expression* SpreadCallNew(Expression* function, | 1046 Expression* SpreadCallNew(Expression* function, |
1046 ZoneList<v8::internal::Expression*>* args, int pos); | 1047 ZoneList<v8::internal::Expression*>* args, int pos); |
1047 | 1048 |
1048 void SetLanguageMode(Scope* scope, LanguageMode mode); | 1049 void SetLanguageMode(Scope* scope, LanguageMode mode); |
1049 void RaiseLanguageMode(LanguageMode mode); | 1050 void RaiseLanguageMode(LanguageMode mode); |
1050 | 1051 |
| 1052 V8_INLINE void MarkCollectedTailCallExpressions(); |
| 1053 |
1051 V8_INLINE void RewriteDestructuringAssignments(); | 1054 V8_INLINE void RewriteDestructuringAssignments(); |
1052 | 1055 |
1053 V8_INLINE Expression* RewriteExponentiation(Expression* left, | 1056 V8_INLINE Expression* RewriteExponentiation(Expression* left, |
1054 Expression* right, int pos); | 1057 Expression* right, int pos); |
1055 V8_INLINE Expression* RewriteAssignExponentiation(Expression* left, | 1058 V8_INLINE Expression* RewriteAssignExponentiation(Expression* left, |
1056 Expression* right, int pos); | 1059 Expression* right, int pos); |
1057 | 1060 |
1058 friend class NonPatternRewriter; | 1061 friend class NonPatternRewriter; |
1059 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit); | 1062 V8_INLINE Expression* RewriteSpreads(ArrayLiteral* lit); |
1060 | 1063 |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 | 1252 |
1250 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1253 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1251 return parser_->ParseDoExpression(ok); | 1254 return parser_->ParseDoExpression(ok); |
1252 } | 1255 } |
1253 | 1256 |
1254 | 1257 |
1255 } // namespace internal | 1258 } // namespace internal |
1256 } // namespace v8 | 1259 } // namespace v8 |
1257 | 1260 |
1258 #endif // V8_PARSING_PARSER_H_ | 1261 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |