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

Side by Side Diff: src/parser.h

Issue 575083002: Cleanup class parsing a bit (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Git rebase Created 6 years, 3 months 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
« no previous file with comments | « src/ast.h ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 } 517 }
518 static Expression* EmptyExpression() { 518 static Expression* EmptyExpression() {
519 return NULL; 519 return NULL;
520 } 520 }
521 static Expression* EmptyArrowParamList() { return NULL; } 521 static Expression* EmptyArrowParamList() { return NULL; }
522 static Literal* EmptyLiteral() { 522 static Literal* EmptyLiteral() {
523 return NULL; 523 return NULL;
524 } 524 }
525 static ObjectLiteralProperty* EmptyObjectLiteralProperty() { return NULL; } 525 static ObjectLiteralProperty* EmptyObjectLiteralProperty() { return NULL; }
526 static FunctionLiteral* EmptyFunctionLiteral() { return NULL; } 526 static FunctionLiteral* EmptyFunctionLiteral() { return NULL; }
527 static ClassLiteral* EmptyClassLiteral() { return NULL; }
528 527
529 // Used in error return values. 528 // Used in error return values.
530 static ZoneList<Expression*>* NullExpressionList() { 529 static ZoneList<Expression*>* NullExpressionList() {
531 return NULL; 530 return NULL;
532 } 531 }
533 532
534 // Non-NULL empty string. 533 // Non-NULL empty string.
535 V8_INLINE const AstRawString* EmptyIdentifierString(); 534 V8_INLINE const AstRawString* EmptyIdentifierString();
536 535
537 // Odd-ball literal creators. 536 // Odd-ball literal creators.
538 Literal* GetLiteralTheHole(int position, 537 Literal* GetLiteralTheHole(int position,
539 AstNodeFactory<AstConstructionVisitor>* factory); 538 AstNodeFactory<AstConstructionVisitor>* factory);
540 539
541 // Producing data during the recursive descent. 540 // Producing data during the recursive descent.
542 const AstRawString* GetSymbol(Scanner* scanner); 541 const AstRawString* GetSymbol(Scanner* scanner);
543 const AstRawString* GetNextSymbol(Scanner* scanner); 542 const AstRawString* GetNextSymbol(Scanner* scanner);
544 const AstRawString* GetNumberAsSymbol(Scanner* scanner); 543 const AstRawString* GetNumberAsSymbol(Scanner* scanner);
545 544
546 Expression* ThisExpression(Scope* scope, 545 Expression* ThisExpression(Scope* scope,
547 AstNodeFactory<AstConstructionVisitor>* factory, 546 AstNodeFactory<AstConstructionVisitor>* factory,
548 int pos = RelocInfo::kNoPosition); 547 int pos = RelocInfo::kNoPosition);
549 Expression* SuperReference(Scope* scope, 548 Expression* SuperReference(Scope* scope,
550 AstNodeFactory<AstConstructionVisitor>* factory, 549 AstNodeFactory<AstConstructionVisitor>* factory,
551 int pos = RelocInfo::kNoPosition); 550 int pos = RelocInfo::kNoPosition);
551 Expression* ClassLiteral(const AstRawString* name, Expression* extends,
552 Expression* constructor,
553 ZoneList<ObjectLiteral::Property*>* properties,
554 int pos,
555 AstNodeFactory<AstConstructionVisitor>* factory);
556
552 Literal* ExpressionFromLiteral( 557 Literal* ExpressionFromLiteral(
553 Token::Value token, int pos, Scanner* scanner, 558 Token::Value token, int pos, Scanner* scanner,
554 AstNodeFactory<AstConstructionVisitor>* factory); 559 AstNodeFactory<AstConstructionVisitor>* factory);
555 Expression* ExpressionFromIdentifier( 560 Expression* ExpressionFromIdentifier(
556 const AstRawString* name, int pos, Scope* scope, 561 const AstRawString* name, int pos, Scope* scope,
557 AstNodeFactory<AstConstructionVisitor>* factory); 562 AstNodeFactory<AstConstructionVisitor>* factory);
558 Expression* ExpressionFromString( 563 Expression* ExpressionFromString(
559 int pos, Scanner* scanner, 564 int pos, Scanner* scanner,
560 AstNodeFactory<AstConstructionVisitor>* factory); 565 AstNodeFactory<AstConstructionVisitor>* factory);
561 Expression* GetIterator(Expression* iterable, 566 Expression* GetIterator(Expression* iterable,
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 private: 921 private:
917 static const int kLiteralTypeSlot = 0; 922 static const int kLiteralTypeSlot = 0;
918 static const int kElementsSlot = 1; 923 static const int kElementsSlot = 1;
919 924
920 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 925 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
921 }; 926 };
922 927
923 } } // namespace v8::internal 928 } } // namespace v8::internal
924 929
925 #endif // V8_PARSER_H_ 930 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698