Index: src/x64/interface-descriptors-x64.cc |
diff --git a/src/x64/interface-descriptors-x64.cc b/src/x64/interface-descriptors-x64.cc |
index 27737ec5bfc2b3857c768196eef0beb08e98a1d9..dfb8c4df88ff5a149a8436713b99ebe5045e80c8 100644 |
--- a/src/x64/interface-descriptors-x64.cc |
+++ b/src/x64/interface-descriptors-x64.cc |
@@ -15,6 +15,156 @@ const Register InterfaceDescriptor::ContextRegister() { return rsi; } |
void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
+ InitializeForIsolateAllPlatforms(isolate); |
+ |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall); |
+ Register registers[] = {rsi, rbx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::FastNewContextCall); |
+ Register registers[] = {rsi, rdi}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::ToNumberCall); |
+ // ToNumberStub invokes a function, and therefore needs a context. |
+ Register registers[] = {rsi, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::NumberToStringCall); |
+ Register registers[] = {rsi, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall); |
+ Register registers[] = {rsi, rax, rbx, rcx}; |
+ Representation representations[] = { |
+ Representation::Tagged(), Representation::Tagged(), |
+ Representation::Smi(), Representation::Tagged()}; |
+ descriptor->Initialize(arraysize(registers), registers, representations); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::FastCloneShallowObjectCall); |
+ Register registers[] = {rsi, rax, rbx, rcx, rdx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall); |
+ Register registers[] = {rsi, rbx, rdx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CallFunctionCall); |
+ Register registers[] = {rsi, rdi}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CallConstructCall); |
+ // rax : number of arguments |
+ // rbx : feedback vector |
+ // rdx : (only if rbx is not the megamorphic symbol) slot in feedback |
+ // vector (Smi) |
+ // rdi : constructor function |
+ // TODO(turbofan): So far we don't gather type feedback and hence skip the |
+ // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
+ Register registers[] = {rsi, rax, rdi, rbx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall); |
+ Register registers[] = {rsi, rcx, rbx, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall); |
+ Register registers[] = {rsi, rax, rbx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
+ CallDescriptorKey::ArrayConstructorConstantArgCountCall); |
+ // register state |
+ // rax -- number of arguments |
+ // rdi -- function |
+ // rbx -- allocation site with elements kind |
+ Register registers[] = {rsi, rdi, rbx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall); |
+ // stack param count needs (constructor pointer, and single argument) |
+ Register registers[] = {rsi, rdi, rbx, rax}; |
+ Representation representations[] = { |
+ Representation::Tagged(), Representation::Tagged(), |
+ Representation::Tagged(), Representation::Integer32()}; |
+ descriptor->Initialize(arraysize(registers), registers, representations); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
+ CallDescriptorKey::InternalArrayConstructorConstantArgCountCall); |
+ // register state |
+ // rsi -- context |
+ // rax -- number of arguments |
+ // rdi -- constructor function |
+ Register registers[] = {rsi, rdi}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
+ CallDescriptorKey::InternalArrayConstructorCall); |
+ // stack param count needs (constructor pointer, and single argument) |
+ Register registers[] = {rsi, rdi, rax}; |
+ Representation representations[] = {Representation::Tagged(), |
+ Representation::Tagged(), |
+ Representation::Integer32()}; |
+ descriptor->Initialize(arraysize(registers), registers, representations); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CompareNilCall); |
+ Register registers[] = {rsi, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::ToBooleanCall); |
+ Register registers[] = {rsi, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::BinaryOpCall); |
+ Register registers[] = {rsi, rdx, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
+ CallDescriptorKey::BinaryOpWithAllocationSiteCall); |
+ Register registers[] = {rsi, rcx, rdx, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::StringAddCall); |
+ Register registers[] = {rsi, rdx, rax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ |
{ |
CallInterfaceDescriptor* descriptor = |
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); |