| Index: src/a64/code-stubs-a64.cc
|
| diff --git a/src/a64/code-stubs-a64.cc b/src/a64/code-stubs-a64.cc
|
| index 5ccaabb44209ca651935754afd36953394bae380..befb69c5c380b03e483408101f2d49dfe5d76464 100644
|
| --- a/src/a64/code-stubs-a64.cc
|
| +++ b/src/a64/code-stubs-a64.cc
|
| @@ -401,6 +401,65 @@ void NewStringAddStub::InitializeInterfaceDescriptor(
|
| }
|
|
|
|
|
| +void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
|
| + static PlatformCallInterfaceDescriptor default_descriptor =
|
| + PlatformCallInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
|
| +
|
| + static PlatformCallInterfaceDescriptor noInlineDescriptor =
|
| + PlatformCallInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
|
| +
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
|
| + static Register registers[] = { x1, // JSFunction
|
| + cp, // context
|
| + x0, // actual number of arguments
|
| + x2, // 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;
|
| + descriptor->platform_specific_descriptor_ = &default_descriptor;
|
| + }
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::KeyedCall);
|
| + static Register registers[] = { cp, // context
|
| + x2, // key
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // context
|
| + Representation::Tagged(), // key
|
| + };
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + descriptor->platform_specific_descriptor_ = &noInlineDescriptor;
|
| + }
|
| + {
|
| + CallInterfaceDescriptor* descriptor =
|
| + isolate->call_descriptor(Isolate::NamedCall);
|
| + static Register registers[] = { cp, // context
|
| + x2, // name
|
| + };
|
| + static Representation representations[] = {
|
| + Representation::Tagged(), // context
|
| + Representation::Tagged(), // name
|
| + };
|
| + descriptor->register_param_count_ = 2;
|
| + descriptor->register_params_ = registers;
|
| + descriptor->param_representations_ = representations;
|
| + descriptor->platform_specific_descriptor_ = &noInlineDescriptor;
|
| + }
|
| +}
|
| +
|
| +
|
| #define __ ACCESS_MASM(masm)
|
|
|
|
|
| @@ -3388,8 +3447,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ InvokeFunction(function,
|
| actual,
|
| JUMP_FUNCTION,
|
| - NullCallWrapper(),
|
| - CALL_AS_FUNCTION);
|
| + NullCallWrapper());
|
|
|
| // Slow-case: Non-function called.
|
| __ Bind(&slow);
|
| @@ -3409,8 +3467,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ Push(function); // put proxy as additional argument
|
| __ Mov(x0, argc_ + 1);
|
| __ Mov(x2, 0);
|
| - __ GetBuiltinEntry(x3, Builtins::CALL_FUNCTION_PROXY);
|
| - __ SetCallKind(x5, CALL_AS_METHOD);
|
| + __ GetBuiltinFunction(x1, Builtins::CALL_FUNCTION_PROXY);
|
| {
|
| Handle<Code> adaptor =
|
| masm->isolate()->builtins()->ArgumentsAdaptorTrampoline();
|
| @@ -3423,8 +3480,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) {
|
| __ Poke(function, argc_ * kXRegSizeInBytes);
|
| __ Mov(x0, argc_); // Set up the number of arguments.
|
| __ Mov(x2, 0);
|
| - __ GetBuiltinEntry(x3, Builtins::CALL_NON_FUNCTION);
|
| - __ SetCallKind(x5, CALL_AS_FUNCTION);
|
| + __ GetBuiltinFunction(function, Builtins::CALL_NON_FUNCTION);
|
| __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
|
| RelocInfo::CODE_TARGET);
|
| }
|
| @@ -3466,17 +3522,15 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
|
| __ Bind(&slow);
|
| __ Cmp(object_type, JS_FUNCTION_PROXY_TYPE);
|
| __ B(ne, &non_function_call);
|
| - Register builtin = x3;
|
| - __ GetBuiltinEntry(builtin, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR);
|
| + __ GetBuiltinFunction(x1, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR);
|
| __ B(&do_call);
|
|
|
| __ Bind(&non_function_call);
|
| - __ GetBuiltinEntry(builtin, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
|
| + __ GetBuiltinFunction(x1, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
|
|
|
| __ Bind(&do_call);
|
| // Set expected number of arguments to zero (not changing x0).
|
| __ Mov(x2, 0);
|
| - __ SetCallKind(x5, CALL_AS_METHOD);
|
| __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
|
| RelocInfo::CODE_TARGET);
|
| }
|
| @@ -5238,8 +5292,7 @@ void StubFailureTailCallTrampolineStub::Generate(MacroAssembler* masm) {
|
| __ Sub(x0, x0, 1);
|
| masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
|
| ParameterCount argument_count(x0);
|
| - __ InvokeFunction(
|
| - x1, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
|
| + __ InvokeFunction(x1, argument_count, JUMP_FUNCTION, NullCallWrapper());
|
| }
|
|
|
|
|
|
|