| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index 0ce6f7d1a602a79eff225dcdbd926e038ab7bb7f..60f7e46ed51fce9b162f0304a6cd9826936f60ca 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -5608,7 +5608,11 @@ 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);
|
| +
|
| + // new target
|
| + __ PushRoot(Heap::kUndefinedValueRootIndex);
|
|
|
| // Save context, callee and call data.
|
| __ Push(context, callee, call_data);
|
| @@ -5632,7 +5636,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;
|
|
|
| FrameScope frame_scope(masm, StackFrame::MANUAL);
|
| __ EnterExitFrame(false, kApiStackSpace);
|
| @@ -5649,8 +5653,6 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
| // FunctionCallbackInfo::length_ = argc
|
| __ li(at, Operand(argc()));
|
| __ sw(at, MemOperand(a0, 2 * kPointerSize));
|
| - // FunctionCallbackInfo::is_construct_call_ = 0
|
| - __ sw(zero_reg, MemOperand(a0, 3 * kPointerSize));
|
|
|
| ExternalReference thunk_ref =
|
| ExternalReference::invoke_function_callback(masm->isolate());
|
| @@ -5667,8 +5669,9 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
|
| }
|
| MemOperand return_value_operand(fp, return_value_offset * kPointerSize);
|
| int stack_space = 0;
|
| - int32_t stack_space_offset = 4 * kPointerSize;
|
| + int32_t stack_space_offset = 3 * kPointerSize;
|
| stack_space = argc() + FCA::kArgsLength + 1;
|
| + // TODO(adamk): Why are we clobbering this immediately?
|
| stack_space_offset = kInvalidStackOffset;
|
| CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, stack_space,
|
| stack_space_offset, return_value_operand,
|
|
|