| Index: src/x64/builtins-x64.cc
|
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
|
| index 780307317881d0720884cc8b8beec64e45a070e6..0e6e739278ee3660164c01af11fca69b96b0e314 100644
|
| --- a/src/x64/builtins-x64.cc
|
| +++ b/src/x64/builtins-x64.cc
|
| @@ -372,9 +372,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
|
| Handle<Code> code =
|
| masm->isolate()->builtins()->HandleApiCallConstruct();
|
| - ParameterCount expected(0);
|
| - __ InvokeCode(code, expected, expected, RelocInfo::CODE_TARGET,
|
| - CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
|
| + __ SetCallKind(rcx, CALL_AS_METHOD);
|
| + __ Call(code, RelocInfo::CODE_TARGET);
|
| } else {
|
| ParameterCount actual(rax);
|
| __ InvokeFunction(rdi, actual, CALL_FUNCTION,
|
| @@ -1327,7 +1326,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
|
| // -- rax : actual number of arguments
|
| // -- rbx : expected number of arguments
|
| // -- rcx : call kind information
|
| - // -- rdx : code entry to call
|
| + // -- rdi: function (passed through to callee)
|
| // -----------------------------------
|
|
|
| Label invoke, dont_adapt_arguments;
|
| @@ -1335,6 +1334,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
|
| __ IncrementCounter(counters->arguments_adaptors(), 1);
|
|
|
| Label enough, too_few;
|
| + __ movq(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset));
|
| __ cmpq(rax, rbx);
|
| __ j(less, &too_few);
|
| __ cmpq(rbx, Immediate(SharedFunctionInfo::kDontAdaptArgumentsSentinel));
|
|
|