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_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 AstNodeFactory<AstConstructionVisitor>* factory, | 540 AstNodeFactory<AstConstructionVisitor>* factory, |
541 int pos = RelocInfo::kNoPosition); | 541 int pos = RelocInfo::kNoPosition); |
542 Expression* SuperReference(Scope* scope, | 542 Expression* SuperReference(Scope* scope, |
543 AstNodeFactory<AstConstructionVisitor>* factory, | 543 AstNodeFactory<AstConstructionVisitor>* factory, |
544 int pos = RelocInfo::kNoPosition); | 544 int pos = RelocInfo::kNoPosition); |
545 Expression* ClassExpression(const AstRawString* name, Expression* extends, | 545 Expression* ClassExpression(const AstRawString* name, Expression* extends, |
546 Expression* constructor, | 546 Expression* constructor, |
547 ZoneList<ObjectLiteral::Property*>* properties, | 547 ZoneList<ObjectLiteral::Property*>* properties, |
548 int start_position, int end_position, | 548 int start_position, int end_position, |
549 AstNodeFactory<AstConstructionVisitor>* factory); | 549 AstNodeFactory<AstConstructionVisitor>* factory); |
550 | 550 Expression* DefaultConstructor(bool call_super, Scope* scope, int pos, |
| 551 int end_pos); |
551 Literal* ExpressionFromLiteral( | 552 Literal* ExpressionFromLiteral( |
552 Token::Value token, int pos, Scanner* scanner, | 553 Token::Value token, int pos, Scanner* scanner, |
553 AstNodeFactory<AstConstructionVisitor>* factory); | 554 AstNodeFactory<AstConstructionVisitor>* factory); |
554 Expression* ExpressionFromIdentifier( | 555 Expression* ExpressionFromIdentifier( |
555 const AstRawString* name, int pos, Scope* scope, | 556 const AstRawString* name, int pos, Scope* scope, |
556 AstNodeFactory<AstConstructionVisitor>* factory); | 557 AstNodeFactory<AstConstructionVisitor>* factory); |
557 Expression* ExpressionFromString( | 558 Expression* ExpressionFromString( |
558 int pos, Scanner* scanner, | 559 int pos, Scanner* scanner, |
559 AstNodeFactory<AstConstructionVisitor>* factory); | 560 AstNodeFactory<AstConstructionVisitor>* factory); |
560 Expression* GetIterator(Expression* iterable, | 561 Expression* GetIterator(Expression* iterable, |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 bool TargetStackContainsLabel(const AstRawString* label); | 798 bool TargetStackContainsLabel(const AstRawString* label); |
798 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); | 799 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
799 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); | 800 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |
800 | 801 |
801 void RegisterTargetUse(Label* target, Target* stop); | 802 void RegisterTargetUse(Label* target, Target* stop); |
802 | 803 |
803 // Factory methods. | 804 // Factory methods. |
804 | 805 |
805 Scope* NewScope(Scope* parent, ScopeType type); | 806 Scope* NewScope(Scope* parent, ScopeType type); |
806 | 807 |
| 808 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, |
| 809 int end_pos); |
| 810 |
807 // Skip over a lazy function, either using cached data if we have it, or | 811 // Skip over a lazy function, either using cached data if we have it, or |
808 // by parsing the function with PreParser. Consumes the ending }. | 812 // by parsing the function with PreParser. Consumes the ending }. |
809 void SkipLazyFunctionBody(const AstRawString* function_name, | 813 void SkipLazyFunctionBody(const AstRawString* function_name, |
810 int* materialized_literal_count, | 814 int* materialized_literal_count, |
811 int* expected_property_count, | 815 int* expected_property_count, |
812 bool* ok); | 816 bool* ok); |
813 | 817 |
814 PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser( | 818 PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser( |
815 SingletonLogger* logger); | 819 SingletonLogger* logger); |
816 | 820 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 private: | 922 private: |
919 static const int kLiteralTypeSlot = 0; | 923 static const int kLiteralTypeSlot = 0; |
920 static const int kElementsSlot = 1; | 924 static const int kElementsSlot = 1; |
921 | 925 |
922 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 926 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
923 }; | 927 }; |
924 | 928 |
925 } } // namespace v8::internal | 929 } } // namespace v8::internal |
926 | 930 |
927 #endif // V8_PARSER_H_ | 931 #endif // V8_PARSER_H_ |
OLD | NEW |