Index: src/mips/builtins-mips.cc |
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc |
index 4c34a08b2d2f32d21441c0888cf02b2d7591ed31..2c80c75c7909eab488380ad3ff64c089eee99629 100644 |
--- a/src/mips/builtins-mips.cc |
+++ b/src/mips/builtins-mips.cc |
@@ -641,15 +641,15 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ bind(&count_incremented); |
} |
+ __ Pop(a1); |
+ |
__ Push(t4, t4); |
// Reload the number of arguments from the stack. |
// sp[0]: receiver |
// sp[1]: receiver |
- // sp[2]: constructor function |
- // sp[3]: number of arguments (smi-tagged) |
- __ lw(a1, MemOperand(sp, 2 * kPointerSize)); |
- __ lw(a3, MemOperand(sp, 3 * kPointerSize)); |
+ // sp[2]: number of arguments (smi-tagged) |
+ __ lw(a3, MemOperand(sp, 2 * kPointerSize)); |
// Set up pointer to last argument. |
__ Addu(a2, fp, Operand(StandardFrameConstants::kCallerSPOffset)); |
@@ -664,8 +664,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// a3: number of arguments (smi-tagged) |
// sp[0]: receiver |
// sp[1]: receiver |
- // sp[2]: constructor function |
- // sp[3]: number of arguments (smi-tagged) |
+ // sp[2]: number of arguments (smi-tagged) |
Label loop, entry; |
__ jmp(&entry); |
__ bind(&loop); |
@@ -706,8 +705,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// If the result is a smi, it is *not* an object in the ECMA sense. |
// v0: result |
// sp[0]: receiver (newly allocated object) |
- // sp[1]: constructor function |
- // sp[2]: number of arguments (smi-tagged) |
+ // sp[1]: number of arguments (smi-tagged) |
__ JumpIfSmi(v0, &use_receiver); |
// If the type of the result (stored in its map) is less than |
@@ -725,9 +723,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ bind(&exit); |
// v0: result |
// sp[0]: receiver (newly allocated object) |
- // sp[1]: constructor function |
- // sp[2]: number of arguments (smi-tagged) |
- __ lw(a1, MemOperand(sp, 2 * kPointerSize)); |
+ // sp[1]: number of arguments (smi-tagged) |
+ __ lw(a1, MemOperand(sp, kPointerSize)); |
// Leave construct frame. |
} |