Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index 89056df63018cc1d87223628fdd8bbb3f94dde0d..24ef5a41bed91a3331a38b6973b9df9dc15f3f7b 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -624,16 +624,16 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ bind(&count_incremented); |
} |
+ __ pop(r1); // Constructor function. |
+ |
__ push(r4); |
__ push(r4); |
- // Reload the number of arguments and the constructor from the stack. |
+ // 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) |
- __ ldr(r1, MemOperand(sp, 2 * kPointerSize)); |
- __ ldr(r3, MemOperand(sp, 3 * kPointerSize)); |
+ // sp[2]: number of arguments (smi-tagged) |
+ __ ldr(r3, MemOperand(sp, 2 * kPointerSize)); |
// Set up pointer to last argument. |
__ add(r2, fp, Operand(StandardFrameConstants::kCallerSPOffset)); |
@@ -648,8 +648,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// r3: 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; |
__ b(&entry); |
__ bind(&loop); |
@@ -680,8 +679,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// Restore context from the frame. |
// r0: result |
// sp[0]: receiver |
- // sp[1]: constructor function |
- // sp[2]: number of arguments (smi-tagged) |
+ // sp[1]: number of arguments (smi-tagged) |
__ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
// If the result is an object (in the ECMA sense), we should get rid |
@@ -692,8 +690,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
// If the result is a smi, it is *not* an object in the ECMA sense. |
// r0: 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(r0, &use_receiver); |
// If the type of the result (stored in its map) is less than |
@@ -711,9 +708,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ bind(&exit); |
// r0: result |
// sp[0]: receiver (newly allocated object) |
- // sp[1]: constructor function |
- // sp[2]: number of arguments (smi-tagged) |
- __ ldr(r1, MemOperand(sp, 2 * kPointerSize)); |
+ // sp[1]: number of arguments (smi-tagged) |
+ __ ldr(r1, MemOperand(sp, kPointerSize)); |
// Leave construct frame. |
} |