| Index: src/arm64/builtins-arm64.cc
|
| diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
|
| index 375b8082988a0550efbd15ba20cbfde0bb860988..b1648687e350fa7ed9c035822e5ffa81c0afa4ef 100644
|
| --- a/src/arm64/builtins-arm64.cc
|
| +++ b/src/arm64/builtins-arm64.cc
|
| @@ -51,14 +51,16 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
|
| // ordinary functions).
|
| __ Ldr(cp, FieldMemOperand(x1, JSFunction::kContextOffset));
|
|
|
| - // Insert extra arguments.
|
| - const int num_extra_args = 2;
|
| - __ Push(x1, x3);
|
| -
|
| // JumpToExternalReference expects x0 to contain the number of arguments
|
| // including the receiver and the extra arguments.
|
| + const int num_extra_args = 3;
|
| __ Add(x0, x0, num_extra_args + 1);
|
|
|
| + // Insert extra arguments.
|
| + __ SmiTag(x0);
|
| + __ Push(x0, x1, x3);
|
| + __ SmiUntag(x0);
|
| +
|
| __ JumpToExternalReference(ExternalReference(id, masm->isolate()),
|
| exit_frame_type == BUILTIN_EXIT);
|
| }
|
|
|