| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 4c813554e7e07174bf1994f08713dab426a8303a..8e16ce01869ca972b79dc937efb15c067bfb1cd4 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -284,8 +284,6 @@ FunctionLiteral* Parser::DefaultConstructor(bool call_super, Scope* scope,
|
| AstProperties ast_properties;
|
| BailoutReason dont_optimize_reason = kNoReason;
|
| const AstRawString* name = ast_value_factory()->empty_string();
|
| - FunctionKind kind = call_super ? FunctionKind::kDefaultConstructorCallSuper
|
| - : FunctionKind::kDefaultConstructor;
|
|
|
| Scope* function_scope = NewScope(scope, FUNCTION_SCOPE);
|
| function_scope->SetStrictMode(STRICT);
|
| @@ -309,6 +307,7 @@ FunctionLiteral* Parser::DefaultConstructor(bool call_super, Scope* scope,
|
| Runtime::FunctionForId(Runtime::kDefaultConstructorSuperCall), args,
|
| pos);
|
| body->Add(factory()->NewExpressionStatement(call, pos), zone());
|
| + function_scope->RecordSuperUsage();
|
| }
|
|
|
| materialized_literal_count = function_state.materialized_literal_count();
|
| @@ -324,7 +323,8 @@ FunctionLiteral* Parser::DefaultConstructor(bool call_super, Scope* scope,
|
| materialized_literal_count, expected_property_count, handler_count,
|
| parameter_count, FunctionLiteral::kNoDuplicateParameters,
|
| FunctionLiteral::ANONYMOUS_EXPRESSION, FunctionLiteral::kIsFunction,
|
| - FunctionLiteral::kNotParenthesized, kind, pos);
|
| + FunctionLiteral::kNotParenthesized, FunctionKind::kDefaultConstructor,
|
| + pos);
|
|
|
| function_literal->set_ast_properties(&ast_properties);
|
| function_literal->set_dont_optimize_reason(dont_optimize_reason);
|
| @@ -1069,11 +1069,10 @@ FunctionLiteral* Parser::ParseLazy(Utf16CharacterStream* source) {
|
| Expression* expression = ParseExpression(false, &ok);
|
| DCHECK(expression->IsFunctionLiteral());
|
| result = expression->AsFunctionLiteral();
|
| - } else if (shared_info->is_default_constructor() ||
|
| - shared_info->is_default_constructor_call_super()) {
|
| - result = DefaultConstructor(
|
| - shared_info->is_default_constructor_call_super(), scope,
|
| - shared_info->start_position(), shared_info->end_position());
|
| + } else if (shared_info->is_default_constructor()) {
|
| + result = DefaultConstructor(shared_info->uses_super(), scope,
|
| + shared_info->start_position(),
|
| + shared_info->end_position());
|
| } else {
|
| result = ParseFunctionLiteral(raw_name, Scanner::Location::invalid(),
|
| false, // Strict mode name already checked.
|
|
|