| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 9d1a40d39b9ebb7b47730b4f287d0abcca684276..093b9f7a45409652faf12b20fe7f297c1bde77fb 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -665,7 +665,7 @@ Expression* ParserTraits::SuperReference(
|
| pos);
|
| }
|
|
|
| -Expression* ParserTraits::ClassLiteral(
|
| +Expression* ParserTraits::ClassExpression(
|
| const AstRawString* name, Expression* extends, Expression* constructor,
|
| ZoneList<ObjectLiteral::Property*>* properties, int pos,
|
| AstNodeFactory<AstConstructionVisitor>* factory) {
|
| @@ -1974,21 +1974,18 @@ Statement* Parser::ParseClassDeclaration(ZoneList<const AstRawString*>* names,
|
| Expression* value = ParseClassLiteral(name, scanner()->location(),
|
| is_strict_reserved, pos, CHECK_OK);
|
|
|
| - Block* block = factory()->NewBlock(NULL, 1, true, pos);
|
| - VariableMode mode = LET;
|
| - VariableProxy* proxy = NewUnresolved(name, mode, Interface::NewValue());
|
| + VariableProxy* proxy = NewUnresolved(name, LET, Interface::NewValue());
|
| Declaration* declaration =
|
| - factory()->NewVariableDeclaration(proxy, mode, scope_, pos);
|
| + factory()->NewVariableDeclaration(proxy, LET, scope_, pos);
|
| Declare(declaration, true, CHECK_OK);
|
| + proxy->var()->set_initializer_position(pos);
|
|
|
| Token::Value init_op = Token::INIT_LET;
|
| Assignment* assignment = factory()->NewAssignment(init_op, proxy, value, pos);
|
| - block->AddStatement(
|
| - factory()->NewExpressionStatement(assignment, RelocInfo::kNoPosition),
|
| - zone());
|
| -
|
| + Statement* assignment_statement =
|
| + factory()->NewExpressionStatement(assignment, RelocInfo::kNoPosition);
|
| if (names) names->Add(name, zone());
|
| - return block;
|
| + return assignment_statement;
|
| }
|
|
|
|
|
|
|