| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 2b3f482a265c17e99d4202fa2bb798cc4972a0bd..d9b058f5c20adf1b596440fe07c4b2c69a7000d4 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -5931,16 +5931,16 @@ Expression* Parser::SpreadCall(Expression* function,
|
| int pos) {
|
| if (function->IsSuperCallReference()) {
|
| // Super calls
|
| - // %_CallSuperWithSpread(%ReflectConstruct(<super>, args, new.target))
|
| - args->InsertAt(0, function, zone());
|
| + // %ReflectConstruct(%GetPrototype(<this-function>), args, new.target))
|
| + ZoneList<Expression*>* tmp = new (zone()) ZoneList<Expression*>(1, zone());
|
| + tmp->Add(function->AsSuperCallReference()->this_function_var(), zone());
|
| + Expression* get_prototype = factory()->NewCallRuntime(
|
| + ast_value_factory()->empty_string(),
|
| + Runtime::FunctionForId(Runtime::kGetPrototype), tmp, pos);
|
| + args->InsertAt(0, get_prototype, zone());
|
| args->Add(function->AsSuperCallReference()->new_target_var(), zone());
|
| - Expression* result = factory()->NewCallRuntime(
|
| - ast_value_factory()->reflect_construct_string(), NULL, args, pos);
|
| - args = new (zone()) ZoneList<Expression*>(1, zone());
|
| - args->Add(result, zone());
|
| return factory()->NewCallRuntime(
|
| - ast_value_factory()->empty_string(),
|
| - Runtime::FunctionForId(Runtime::kInlineCallSuperWithSpread), args, pos);
|
| + ast_value_factory()->reflect_construct_string(), NULL, args, pos);
|
| } else {
|
| if (function->IsProperty()) {
|
| // Method calls
|
|
|