Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index 1e5efbb0ac966f403b1c496728f824369a14c6da..a062090cf00438c6fa6acd4ca7697bb9622ac617 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -5636,7 +5636,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); |
@@ -5660,7 +5664,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); |
@@ -5680,8 +5684,6 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) { |
// justified by n64 ABI. |
__ li(at, Operand(argc())); |
__ sw(at, MemOperand(a0, 2 * kPointerSize)); |
- // FunctionCallbackInfo::is_construct_call_ = 0 |
- __ sw(zero_reg, MemOperand(a0, 2 * kPointerSize + kIntSize)); |
ExternalReference thunk_ref = |
ExternalReference::invoke_function_callback(masm->isolate()); |
@@ -5698,8 +5700,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, |