| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index d196d0e857785f3690ae550c3e301551cbef4359..33774d35f5a9c9e1b1f54ba1cd7669e54c1e75ae 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -361,6 +361,56 @@ void NewStringAddStub::InitializeInterfaceDescriptor(
|
| }
|
|
|
|
|
| +void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
|
| + static Register registers[] = { rdi, // JSFunction
|
| + rsi, // context
|
| + rax, // actual number of arguments
|
| + rbx, // expected number of arguments
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // JSFunction
|
| + Representation::Tagged(), // context
|
| + Representation::Integer32(), // actual number of arguments
|
| + Representation::Integer32(), // expected number of arguments
|
| + };
|
| + descriptor->register_param_count_ = 4;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + }
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::KeyedCall);
|
| + static Register registers[] = { rsi, // context
|
| + rcx, // key
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // context
|
| + Representation::Tagged(), // key
|
| + };
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + }
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::NamedCall);
|
| + static Register registers[] = { rsi, // context
|
| + rcx, // name
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // context
|
| + Representation::Tagged(), // name
|
| + };
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + }
|
| +}
|
| +
|
| +
|
| #define __ ACCESS_MASM(masm)
|
|
|
|
|
| @@ -2364,11 +2414,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| // Fast-case: Just invoke the function.
|
| ParameterCount actual(argc_);
|
|
|
| - __ InvokeFunction(rdi,
|
| - actual,
|
| - JUMP_FUNCTION,
|
| - NullCallWrapper(),
|
| - CALL_AS_FUNCTION);
|
| + __ InvokeFunction(rdi, actual, JUMP_FUNCTION, NullCallWrapper());
|
|
|
| // Slow-case: Non-function called.
|
| __ bind(&slow);
|
| @@ -2387,7 +2433,6 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ PushReturnAddressFrom(rcx);
|
| __ Set(rax, argc_ + 1);
|
| __ Set(rbx, 0);
|
| - __ SetCallKind(rcx, CALL_AS_FUNCTION);
|
| __ GetBuiltinEntry(rdx, Builtins::CALL_FUNCTION_PROXY);
|
| {
|
| Handle<Code> adaptor =
|
| @@ -2401,7 +2446,6 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ movq(args.GetReceiverOperand(), rdi);
|
| __ Set(rax, argc_);
|
| __ Set(rbx, 0);
|
| - __ SetCallKind(rcx, CALL_AS_FUNCTION);
|
| __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION);
|
| Handle<Code> adaptor =
|
| isolate->builtins()->ArgumentsAdaptorTrampoline();
|
| @@ -2448,7 +2492,6 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| __ bind(&do_call);
|
| // Set expected number of arguments to zero (not changing rax).
|
| __ Set(rbx, 0);
|
| - __ SetCallKind(rcx, CALL_AS_METHOD);
|
| __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
|
| RelocInfo::CODE_TARGET);
|
| }
|
| @@ -5111,8 +5154,7 @@ void StubFailureTailCallTrampolineStub::Generate(MacroAssembler* masm) {
|
| __ subl(rax, Immediate(1));
|
| masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
|
| ParameterCount argument_count(rax);
|
| - __ InvokeFunction(
|
| - rdi, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
|
| + __ InvokeFunction(rdi, argument_count, JUMP_FUNCTION, NullCallWrapper());
|
| }
|
|
|
|
|
|
|