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

Unified Diff: src/parser.h

Issue 679943004: Remove AstConstructionVisitor/AstNullVisitor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 74f3944718f54b254d7b8aeebbcd3d39f34dbce7..5ddcaf8903d0470eedbed62a745b81ca03b5b6b3 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -373,7 +373,7 @@ class ParserTraits {
typedef ZoneList<v8::internal::Statement*>* StatementList;
// For constructing objects returned by the traversing functions.
- typedef AstNodeFactory<AstConstructionVisitor> Factory;
+ typedef AstNodeFactory Factory;
};
explicit ParserTraits(Parser* parser) : parser_(parser) {}
@@ -451,9 +451,9 @@ class ParserTraits {
// Returns true if we have a binary expression between two numeric
// literals. In that case, *x will be changed to an expression which is the
// computed value.
- bool ShortcutNumericLiteralBinaryExpression(
- Expression** x, Expression* y, Token::Value op, int pos,
- AstNodeFactory<AstConstructionVisitor>* factory);
+ bool ShortcutNumericLiteralBinaryExpression(Expression** x, Expression* y,
+ Token::Value op, int pos,
+ AstNodeFactory* factory);
// Rewrites the following types of unary expressions:
// not <literal> -> true / false
@@ -466,9 +466,8 @@ class ParserTraits {
// + foo -> foo * 1
// - foo -> foo * (-1)
// ~ foo -> foo ^(~0)
- Expression* BuildUnaryExpression(
- Expression* expression, Token::Value op, int pos,
- AstNodeFactory<AstConstructionVisitor>* factory);
+ Expression* BuildUnaryExpression(Expression* expression, Token::Value op,
+ int pos, AstNodeFactory* factory);
// Generate AST node that throws a ReferenceError with the given type.
Expression* NewThrowReferenceError(const char* type, int pos);
@@ -528,37 +527,30 @@ class ParserTraits {
V8_INLINE const AstRawString* EmptyIdentifierString();
// Odd-ball literal creators.
- Literal* GetLiteralTheHole(int position,
- AstNodeFactory<AstConstructionVisitor>* factory);
+ Literal* GetLiteralTheHole(int position, AstNodeFactory* factory);
// Producing data during the recursive descent.
const AstRawString* GetSymbol(Scanner* scanner);
const AstRawString* GetNextSymbol(Scanner* scanner);
const AstRawString* GetNumberAsSymbol(Scanner* scanner);
- Expression* ThisExpression(Scope* scope,
- AstNodeFactory<AstConstructionVisitor>* factory,
+ Expression* ThisExpression(Scope* scope, AstNodeFactory* factory,
int pos = RelocInfo::kNoPosition);
- Expression* SuperReference(Scope* scope,
- AstNodeFactory<AstConstructionVisitor>* factory,
+ Expression* SuperReference(Scope* scope, AstNodeFactory* factory,
int pos = RelocInfo::kNoPosition);
Expression* ClassExpression(const AstRawString* name, Expression* extends,
Expression* constructor,
ZoneList<ObjectLiteral::Property*>* properties,
int start_position, int end_position,
- AstNodeFactory<AstConstructionVisitor>* factory);
-
- Literal* ExpressionFromLiteral(
- Token::Value token, int pos, Scanner* scanner,
- AstNodeFactory<AstConstructionVisitor>* factory);
- Expression* ExpressionFromIdentifier(
- const AstRawString* name, int pos, Scope* scope,
- AstNodeFactory<AstConstructionVisitor>* factory);
- Expression* ExpressionFromString(
- int pos, Scanner* scanner,
- AstNodeFactory<AstConstructionVisitor>* factory);
- Expression* GetIterator(Expression* iterable,
- AstNodeFactory<AstConstructionVisitor>* factory);
+ AstNodeFactory* factory);
+
+ Literal* ExpressionFromLiteral(Token::Value token, int pos, Scanner* scanner,
+ AstNodeFactory* factory);
+ Expression* ExpressionFromIdentifier(const AstRawString* name, int pos,
+ Scope* scope, AstNodeFactory* factory);
+ Expression* ExpressionFromString(int pos, Scanner* scanner,
+ AstNodeFactory* factory);
+ Expression* GetIterator(Expression* iterable, AstNodeFactory* factory);
ZoneList<v8::internal::Expression*>* NewExpressionList(int size, Zone* zone) {
return new(zone) ZoneList<v8::internal::Expression*>(size, zone);
}
« no previous file with comments | « src/ast.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698