Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index b9f8d9f93d3d2cf72e8f623291854b7b731d4b6a..c31966651a004cedcd868353b960eb25727e2b54 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -1163,9 +1163,10 @@ void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
// esp[0] : return address |
- // esp[4] : index of rest parameter |
- // esp[8] : number of parameters |
- // esp[12] : receiver displacement |
+ // esp[4] : language mode |
+ // esp[8] : index of rest parameter |
+ // esp[12] : number of parameters |
+ // esp[16] : receiver displacement |
// Check if the calling frame is an arguments adaptor frame. |
Label runtime; |
@@ -1176,13 +1177,13 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
// Patch the arguments.length and the parameters pointer. |
__ mov(ecx, Operand(edx, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
- __ mov(Operand(esp, 2 * kPointerSize), ecx); |
+ __ mov(Operand(esp, 3 * kPointerSize), ecx); |
__ lea(edx, Operand(edx, ecx, times_2, |
StandardFrameConstants::kCallerSPOffset)); |
- __ mov(Operand(esp, 3 * kPointerSize), edx); |
+ __ mov(Operand(esp, 4 * kPointerSize), edx); |
__ bind(&runtime); |
- __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
+ __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); |
} |