Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index dcd5e45ee30183d2a603aa26982322a74b6601d9..893dc5274a2074832cbf0d05d413a4d749655183 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -847,9 +847,10 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(MacroAssembler* masm) { |
void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
// rsp[0] : return address |
- // rsp[8] : index of rest parameter |
- // rsp[16] : number of parameters |
- // rsp[24] : receiver displacement |
+ // rsp[8] : language mode |
+ // rsp[16] : index of rest parameter |
+ // rsp[24] : number of parameters |
+ // rsp[32] : receiver displacement |
// Check if the calling frame is an arguments adaptor frame. |
Label runtime; |
@@ -859,7 +860,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
__ j(not_equal, &runtime); |
// Patch the arguments.length and the parameters pointer. |
- StackArgumentsAccessor args(rsp, 3, ARGUMENTS_DONT_CONTAIN_RECEIVER); |
+ StackArgumentsAccessor args(rsp, 4, ARGUMENTS_DONT_CONTAIN_RECEIVER); |
__ movp(rcx, Operand(rdx, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
__ movp(args.GetArgumentOperand(1), rcx); |
__ SmiToInteger64(rcx, rcx); |
@@ -868,7 +869,7 @@ void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { |
__ movp(args.GetArgumentOperand(0), rdx); |
__ bind(&runtime); |
- __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); |
+ __ TailCallRuntime(Runtime::kNewRestParam, 4, 1); |
} |