Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: src/parser.h

Issue 700523003: Classes: Partial fix for constructor not calling super (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
551 Literal* ExpressionFromLiteral( 551 Literal* ExpressionFromLiteral(
552 Token::Value token, int pos, Scanner* scanner, 552 Token::Value token, int pos, Scanner* scanner,
553 AstNodeFactory<AstConstructionVisitor>* factory); 553 AstNodeFactory<AstConstructionVisitor>* factory);
554 Expression* ExpressionFromIdentifier( 554 Expression* ExpressionFromIdentifier(
555 const AstRawString* name, int pos, Scope* scope, 555 const AstRawString* name, int pos, Scope* scope,
556 AstNodeFactory<AstConstructionVisitor>* factory); 556 AstNodeFactory<AstConstructionVisitor>* factory);
557 Expression* ExpressionFromString( 557 Expression* ExpressionFromString(
558 int pos, Scanner* scanner, 558 int pos, Scanner* scanner,
559 AstNodeFactory<AstConstructionVisitor>* factory); 559 AstNodeFactory<AstConstructionVisitor>* factory);
560 Expression* GetIterator(Expression* iterable, 560 Expression* GetIterator(Expression* iterable,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 bool TargetStackContainsLabel(const AstRawString* label); 797 bool TargetStackContainsLabel(const AstRawString* label);
798 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); 798 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok);
799 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); 799 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok);
800 800
801 void RegisterTargetUse(Label* target, Target* stop); 801 void RegisterTargetUse(Label* target, Target* stop);
802 802
803 // Factory methods. 803 // Factory methods.
804 804
805 Scope* NewScope(Scope* parent, ScopeType type); 805 Scope* NewScope(Scope* parent, ScopeType type);
806 806
807 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope);
808
807 // Skip over a lazy function, either using cached data if we have it, or 809 // Skip over a lazy function, either using cached data if we have it, or
808 // by parsing the function with PreParser. Consumes the ending }. 810 // by parsing the function with PreParser. Consumes the ending }.
809 void SkipLazyFunctionBody(const AstRawString* function_name, 811 void SkipLazyFunctionBody(const AstRawString* function_name,
810 int* materialized_literal_count, 812 int* materialized_literal_count,
811 int* expected_property_count, 813 int* expected_property_count,
812 bool* ok); 814 bool* ok);
813 815
814 PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser( 816 PreParser::PreParseResult ParseLazyFunctionBodyWithPreParser(
815 SingletonLogger* logger); 817 SingletonLogger* logger);
816 818
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 private: 920 private:
919 static const int kLiteralTypeSlot = 0; 921 static const int kLiteralTypeSlot = 0;
920 static const int kElementsSlot = 1; 922 static const int kElementsSlot = 1;
921 923
922 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 924 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
923 }; 925 };
924 926
925 } } // namespace v8::internal 927 } } // namespace v8::internal
926 928
927 #endif // V8_PARSER_H_ 929 #endif // V8_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698