| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index f489a90c37d9e46a541f62083558e4d6b7efe478..2414d90e34318aece00fb2e9da02404cfa64b0d5 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -5404,10 +5404,14 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
| STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2);
|
| STATIC_ASSERT(FCA::kIsolateIndex == 1);
|
| STATIC_ASSERT(FCA::kHolderIndex == 0);
|
| - STATIC_ASSERT(FCA::kArgsLength == 7);
|
| + STATIC_ASSERT(FCA::kNewTargetIndex == 7);
|
| + STATIC_ASSERT(FCA::kArgsLength == 8);
|
|
|
| __ PopReturnAddressTo(return_address);
|
|
|
| + // new target
|
| + __ PushRoot(Heap::kUndefinedValueRootIndex);
|
| +
|
| // context save
|
| __ Push(context);
|
|
|
| @@ -5441,7 +5445,7 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
|
|
| // Allocate the v8::Arguments structure in the arguments' space since
|
| // it's not controlled by GC.
|
| - const int kApiStackSpace = 4;
|
| + const int kApiStackSpace = 3;
|
|
|
| PrepareCallApiFunction(masm, kApiStackSpace);
|
|
|
| @@ -5453,8 +5457,6 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
| __ movp(StackSpaceOperand(1), scratch);
|
| // FunctionCallbackInfo::length_.
|
| __ Set(StackSpaceOperand(2), argc);
|
| - // FunctionCallbackInfo::is_construct_call_.
|
| - __ Set(StackSpaceOperand(3), 0);
|
|
|
| #if defined(__MINGW64__) || defined(_WIN64)
|
| Register arguments_arg = rcx;
|
| @@ -5479,11 +5481,11 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
| ARGUMENTS_DONT_CONTAIN_RECEIVER);
|
| Operand context_restore_operand = args_from_rbp.GetArgumentOperand(
|
| FCA::kArgsLength - FCA::kContextSaveIndex);
|
| - Operand is_construct_call_operand = StackSpaceOperand(3);
|
| + Operand length_operand = StackSpaceOperand(2);
|
| Operand return_value_operand = args_from_rbp.GetArgumentOperand(
|
| this->is_store() ? 0 : FCA::kArgsLength - FCA::kReturnValueOffset);
|
| int stack_space = 0;
|
| - Operand* stack_space_operand = &is_construct_call_operand;
|
| + 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,
|
|
|