| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index c59d3ba78fbd557467904af73bba72810fb9521f..7873aa2a3dbc993634253958687b1a8bb55ea6b2 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -1236,8 +1236,7 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
|
| const int kIndexOffset = kLimitOffset - 1 * kPointerSize;
|
| __ Push(rax); // limit
|
| __ Push(Immediate(0)); // index
|
| - // Push newTarget and callee functions
|
| - __ Push(Operand(rbp, kNewTargetOffset));
|
| + // Push the constructor function as callee.
|
| __ Push(Operand(rbp, kFunctionOffset));
|
|
|
| // Loop over the arguments array, pushing each value to the stack
|
| @@ -1247,13 +1246,12 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
|
| // Use undefined feedback vector
|
| __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex);
|
| __ movp(rdi, Operand(rbp, kFunctionOffset));
|
| + __ movp(rcx, Operand(rbp, kNewTargetOffset));
|
|
|
| // Call the function.
|
| CallConstructStub stub(masm->isolate(), SUPER_CONSTRUCTOR_CALL);
|
| __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
|
|
|
| - __ Drop(1);
|
| -
|
| // Leave internal frame.
|
| }
|
| // remove this, target, arguments and newTarget
|
|
|