Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 7e9eee814b7e0147e855e5b942444a45009825be..f18666ade28e75f99677fffbc3fa3d5fb98a7f73 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -414,7 +414,7 @@ Expression* ParserTraits::MarkExpressionAsAssigned(Expression* expression) { |
bool ParserTraits::ShortcutNumericLiteralBinaryExpression( |
Expression** x, Expression* y, Token::Value op, int pos, |
- AstNodeFactory<AstConstructionVisitor>* factory) { |
+ AstNodeFactory* factory) { |
if ((*x)->AsLiteral() && (*x)->AsLiteral()->raw_value()->IsNumber() && |
y->AsLiteral() && y->AsLiteral()->raw_value()->IsNumber()) { |
double x_val = (*x)->AsLiteral()->raw_value()->AsNumber(); |
@@ -472,9 +472,9 @@ bool ParserTraits::ShortcutNumericLiteralBinaryExpression( |
} |
-Expression* ParserTraits::BuildUnaryExpression( |
- Expression* expression, Token::Value op, int pos, |
- AstNodeFactory<AstConstructionVisitor>* factory) { |
+Expression* ParserTraits::BuildUnaryExpression(Expression* expression, |
+ Token::Value op, int pos, |
+ AstNodeFactory* factory) { |
DCHECK(expression != NULL); |
if (expression->IsLiteral()) { |
const AstValue* literal = expression->AsLiteral()->raw_value(); |
@@ -634,13 +634,13 @@ const AstRawString* ParserTraits::GetNextSymbol(Scanner* scanner) { |
} |
-Expression* ParserTraits::ThisExpression( |
- Scope* scope, AstNodeFactory<AstConstructionVisitor>* factory, int pos) { |
+Expression* ParserTraits::ThisExpression(Scope* scope, AstNodeFactory* factory, |
+ int pos) { |
return factory->NewVariableProxy(scope->receiver(), pos); |
} |
-Expression* ParserTraits::SuperReference( |
- Scope* scope, AstNodeFactory<AstConstructionVisitor>* factory, int pos) { |
+Expression* ParserTraits::SuperReference(Scope* scope, AstNodeFactory* factory, |
+ int pos) { |
return factory->NewSuperReference( |
ThisExpression(scope, factory, pos)->AsVariableProxy(), |
pos); |
@@ -649,15 +649,14 @@ Expression* ParserTraits::SuperReference( |
Expression* ParserTraits::ClassExpression( |
const AstRawString* name, Expression* extends, Expression* constructor, |
ZoneList<ObjectLiteral::Property*>* properties, int start_position, |
- int end_position, AstNodeFactory<AstConstructionVisitor>* factory) { |
+ int end_position, AstNodeFactory* factory) { |
return factory->NewClassLiteral(name, extends, constructor, properties, |
start_position, end_position); |
} |
-Literal* ParserTraits::ExpressionFromLiteral( |
- Token::Value token, int pos, |
- Scanner* scanner, |
- AstNodeFactory<AstConstructionVisitor>* factory) { |
+Literal* ParserTraits::ExpressionFromLiteral(Token::Value token, int pos, |
+ Scanner* scanner, |
+ AstNodeFactory* factory) { |
switch (token) { |
case Token::NULL_LITERAL: |
return factory->NewNullLiteral(pos); |
@@ -676,9 +675,9 @@ Literal* ParserTraits::ExpressionFromLiteral( |
} |
-Expression* ParserTraits::ExpressionFromIdentifier( |
- const AstRawString* name, int pos, Scope* scope, |
- AstNodeFactory<AstConstructionVisitor>* factory) { |
+Expression* ParserTraits::ExpressionFromIdentifier(const AstRawString* name, |
+ int pos, Scope* scope, |
+ AstNodeFactory* factory) { |
if (parser_->fni_ != NULL) parser_->fni_->PushVariableName(name); |
// The name may refer to a module instance object, so its type is unknown. |
#ifdef DEBUG |
@@ -690,17 +689,16 @@ Expression* ParserTraits::ExpressionFromIdentifier( |
} |
-Expression* ParserTraits::ExpressionFromString( |
- int pos, Scanner* scanner, |
- AstNodeFactory<AstConstructionVisitor>* factory) { |
+Expression* ParserTraits::ExpressionFromString(int pos, Scanner* scanner, |
+ AstNodeFactory* factory) { |
const AstRawString* symbol = GetSymbol(scanner); |
if (parser_->fni_ != NULL) parser_->fni_->PushLiteralName(symbol); |
return factory->NewStringLiteral(symbol, pos); |
} |
-Expression* ParserTraits::GetIterator( |
- Expression* iterable, AstNodeFactory<AstConstructionVisitor>* factory) { |
+Expression* ParserTraits::GetIterator(Expression* iterable, |
+ AstNodeFactory* factory) { |
Expression* iterator_symbol_literal = |
factory->NewSymbolLiteral("symbolIterator", RelocInfo::kNoPosition); |
int pos = iterable->position(); |
@@ -712,8 +710,8 @@ Expression* ParserTraits::GetIterator( |
} |
-Literal* ParserTraits::GetLiteralTheHole( |
- int position, AstNodeFactory<AstConstructionVisitor>* factory) { |
+Literal* ParserTraits::GetLiteralTheHole(int position, |
+ AstNodeFactory* factory) { |
return factory->NewTheHoleLiteral(RelocInfo::kNoPosition); |
} |
@@ -877,8 +875,7 @@ FunctionLiteral* Parser::DoParseProgram(CompilationInfo* info, Scope** scope, |
ParsingModeScope parsing_mode(this, mode); |
// Enters 'scope'. |
- AstNodeFactory<AstConstructionVisitor> function_factory( |
- ast_value_factory()); |
+ AstNodeFactory function_factory(ast_value_factory()); |
FunctionState function_state(&function_state_, &scope_, *scope, |
&function_factory); |
@@ -989,8 +986,7 @@ FunctionLiteral* Parser::ParseLazy(Utf16CharacterStream* source) { |
zone()); |
} |
original_scope_ = scope; |
- AstNodeFactory<AstConstructionVisitor> function_factory( |
- ast_value_factory()); |
+ AstNodeFactory function_factory(ast_value_factory()); |
FunctionState function_state(&function_state_, &scope_, scope, |
&function_factory); |
DCHECK(scope->strict_mode() == SLOPPY || info()->strict_mode() == STRICT); |
@@ -3500,8 +3496,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral( |
: FunctionLiteral::kNotParenthesized; |
// Parse function body. |
{ |
- AstNodeFactory<AstConstructionVisitor> function_factory( |
- ast_value_factory()); |
+ AstNodeFactory function_factory(ast_value_factory()); |
FunctionState function_state(&function_state_, &scope_, scope, |
&function_factory); |
scope_->SetScopeName(function_name); |