@@ -5546,7 +5546,11 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
55465546 STATIC_ASSERT (FCA ::kReturnValueDefaultValueIndex == 2 );
55475547 STATIC_ASSERT (FCA ::kIsolateIndex == 1 );
55485548 STATIC_ASSERT (FCA ::kHolderIndex == 0 );
5549- STATIC_ASSERT (FCA ::kArgsLength == 7 );
5549+ STATIC_ASSERT (FCA ::kNewTargetIndex == 7 );
5550+ STATIC_ASSERT (FCA ::kArgsLength == 8 );
5551+
5552+ // new target
5553+ __ PushRoot (Heap::kUndefinedValueRootIndex );
55505554
55515555 // context save
55525556 __ push (context);
@@ -5582,10 +5586,10 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
55825586 // it's not controlled by GC.
55835587 // S390 LINUX ABI:
55845588 //
5585- // Create 5 extra slots on stack:
5589+ // Create 4 extra slots on stack:
55865590 // [0] space for DirectCEntryStub's LR save
5587- // [1-4 ] FunctionCallbackInfo
5588- const int kApiStackSpace = 5 ;
5591+ // [1-3 ] FunctionCallbackInfo
5592+ const int kApiStackSpace = 4 ;
55895593 const int kFunctionCallbackInfoOffset =
55905594 (kStackFrameExtraParamSlot + 1 ) * kPointerSize ;
55915595
@@ -5604,9 +5608,6 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
56045608 // FunctionCallbackInfo::length_ = argc
56055609 __ LoadImmP (ip, Operand (argc ()));
56065610 __ StoreW (ip, MemOperand (r2, 2 * kPointerSize ));
5607- // FunctionCallbackInfo::is_construct_call_ = 0
5608- __ LoadImmP (ip, Operand::Zero ());
5609- __ StoreW (ip, MemOperand (r2, 2 * kPointerSize + kIntSize ));
56105611
56115612 ExternalReference thunk_ref =
56125613 ExternalReference::invoke_function_callback (masm->isolate ());
@@ -5623,9 +5624,9 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
56235624 }
56245625 MemOperand return_value_operand (fp, return_value_offset * kPointerSize );
56255626 int stack_space = 0 ;
5626- MemOperand is_construct_call_operand =
5627- MemOperand (sp, kFunctionCallbackInfoOffset + 2 * kPointerSize + kIntSize );
5628- MemOperand* stack_space_operand = &is_construct_call_operand ;
5627+ MemOperand length_operand =
5628+ MemOperand (sp, kFunctionCallbackInfoOffset + 2 * kPointerSize );
5629+ MemOperand* stack_space_operand = &length_operand ;
56295630 stack_space = argc () + FCA ::kArgsLength + 1 ;
56305631 stack_space_operand = NULL ;
56315632 CallApiFunctionAndReturn (masm, api_function_address, thunk_ref, stack_space,
0 commit comments