| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index ea069e276e1888e50861ee2406d09f72feed9eae..30fe1e44eb793f061e1b670345eeda27a8a16da5 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -2650,7 +2650,6 @@
|
| // -- ...
|
| // -- rsp[argc * 8] : first argument
|
| // -- rsp[(argc + 1) * 8] : receiver
|
| - // -- rsp[(argc + 2) * 8] : accessor_holder
|
| // -----------------------------------
|
|
|
| Register callee = rdi;
|
| @@ -2697,25 +2696,15 @@
|
| // holder
|
| __ Push(holder);
|
|
|
| - // enter a new context
|
| - int argc = this->argc();
|
| - if (this->is_lazy()) {
|
| - // load context from accessor_holder
|
| - Register accessor_holder = context;
|
| - __ movp(accessor_holder,
|
| - MemOperand(rsp, (argc + FCA::kArgsLength + 1) * kPointerSize));
|
| - __ movp(scratch, FieldOperand(accessor_holder, HeapObject::kMapOffset));
|
| - __ GetMapConstructor(scratch, scratch, context);
|
| - __ movp(context, FieldOperand(scratch, JSFunction::kContextOffset));
|
| - } else {
|
| - // load context from callee
|
| - __ movp(context, FieldOperand(callee, JSFunction::kContextOffset));
|
| - }
|
| -
|
| __ movp(scratch, rsp);
|
| // Push return address back on stack.
|
| __ PushReturnAddressFrom(return_address);
|
|
|
| + if (!this->is_lazy()) {
|
| + // load context from callee
|
| + __ movp(context, FieldOperand(callee, JSFunction::kContextOffset));
|
| + }
|
| +
|
| // Allocate the v8::Arguments structure in the arguments' space since
|
| // it's not controlled by GC.
|
| const int kApiStackSpace = 3;
|
| @@ -2723,6 +2712,7 @@
|
| PrepareCallApiFunction(masm, kApiStackSpace);
|
|
|
| // FunctionCallbackInfo::implicit_args_.
|
| + int argc = this->argc();
|
| __ movp(StackSpaceOperand(0), scratch);
|
| __ addp(scratch, Immediate((argc + FCA::kArgsLength - 1) * kPointerSize));
|
| // FunctionCallbackInfo::values_.
|
| @@ -2753,10 +2743,13 @@
|
| ARGUMENTS_DONT_CONTAIN_RECEIVER);
|
| Operand context_restore_operand = args_from_rbp.GetArgumentOperand(
|
| FCA::kArgsLength - FCA::kContextSaveIndex);
|
| + Operand length_operand = StackSpaceOperand(2);
|
| Operand return_value_operand = args_from_rbp.GetArgumentOperand(
|
| this->is_store() ? 0 : FCA::kArgsLength - FCA::kReturnValueOffset);
|
| - const int stack_space = argc + FCA::kArgsLength + 2;
|
| - Operand* stack_space_operand = nullptr;
|
| + int stack_space = 0;
|
| + Operand* stack_space_operand = &length_operand;
|
| + stack_space = argc + FCA::kArgsLength + 1;
|
| + stack_space_operand = nullptr;
|
| CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, callback_arg,
|
| stack_space, stack_space_operand,
|
| return_value_operand, &context_restore_operand);
|
|
|