Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 5cbecc22bafd2aa8099bb8ab2a4e08da8a056bdf..3a85089d47bc19a6670a601fadd8a32e5afaad2b 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -1172,8 +1172,7 @@ static void Generate_ConstructHelper(MacroAssembler* masm) { |
const int kIndexOffset = kLimitOffset - 1 * kPointerSize; |
__ Push(eax); // limit |
__ push(Immediate(0)); // index |
- // Push newTarget and callee functions |
- __ push(Operand(ebp, kNewTargetOffset)); |
+ // Push the constructor function as callee. |
__ push(Operand(ebp, kFunctionOffset)); |
// Loop over the arguments array, pushing each value to the stack |
@@ -1183,13 +1182,12 @@ static void Generate_ConstructHelper(MacroAssembler* masm) { |
// Use undefined feedback vector |
__ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); |
__ mov(edi, Operand(ebp, kFunctionOffset)); |
+ __ mov(ecx, Operand(ebp, 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 |