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