Index: src/ia32/interface-descriptors-ia32.cc |
diff --git a/src/ia32/interface-descriptors-ia32.cc b/src/ia32/interface-descriptors-ia32.cc |
index 3d3b7a0fcb3f46fd2f63ca638606eb97837bc46d..9f7cf263e4f61b6bd3dc081341a0ecbec854d95f 100644 |
--- a/src/ia32/interface-descriptors-ia32.cc |
+++ b/src/ia32/interface-descriptors-ia32.cc |
@@ -6,6 +6,7 @@ |
#if V8_TARGET_ARCH_IA32 |
+#include "src/ic/ic-conventions.h" |
#include "src/interface-descriptors.h" |
namespace v8 { |
@@ -15,6 +16,155 @@ const Register InterfaceDescriptor::ContextRegister() { return esi; } |
void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
+ InitializeForIsolateAllPlatforms(isolate); |
+ |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::FastNewClosureCall); |
+ Register registers[] = {esi, ebx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::FastNewContextCall); |
+ Register registers[] = {esi, edi}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::ToNumberCall); |
+ // ToNumberStub invokes a function, and therefore needs a context. |
+ Register registers[] = {esi, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::NumberToStringCall); |
+ Register registers[] = {esi, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::FastCloneShallowArrayCall); |
+ Register registers[] = {esi, eax, ebx, ecx}; |
+ 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[] = {esi, eax, ebx, ecx, edx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CreateAllocationSiteCall); |
+ Register registers[] = {esi, ebx, edx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CallFunctionCall); |
+ Register registers[] = {esi, edi}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CallConstructCall); |
+ // eax : number of arguments |
+ // ebx : feedback vector |
+ // edx : (only if ebx is not the megamorphic symbol) slot in feedback |
+ // vector (Smi) |
+ // edi : 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[] = {esi, eax, edi, ebx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::RegExpConstructResultCall); |
+ Register registers[] = {esi, ecx, ebx, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::TransitionElementsKindCall); |
+ Register registers[] = {esi, eax, ebx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
+ CallDescriptorKey::ArrayConstructorConstantArgCountCall); |
+ // register state |
+ // eax -- number of arguments |
+ // edi -- function |
+ // ebx -- allocation site with elements kind |
+ Register registers[] = {esi, edi, ebx}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::ArrayConstructorCall); |
+ // stack param count needs (constructor pointer, and single argument) |
+ Register registers[] = {esi, edi, ebx, eax}; |
+ 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 |
+ // eax -- number of arguments |
+ // edi -- function |
+ Register registers[] = {esi, edi}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
+ CallDescriptorKey::InternalArrayConstructorCall); |
+ // stack param count needs (constructor pointer, and single argument) |
+ Register registers[] = {esi, edi, eax}; |
+ Representation representations[] = {Representation::Tagged(), |
+ Representation::Tagged(), |
+ Representation::Integer32()}; |
+ descriptor->Initialize(arraysize(registers), registers, representations); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::CompareNilCall); |
+ Register registers[] = {esi, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::ToBooleanCall); |
+ Register registers[] = {esi, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::BinaryOpCall); |
+ Register registers[] = {esi, edx, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = isolate->call_descriptor( |
+ CallDescriptorKey::BinaryOpWithAllocationSiteCall); |
+ Register registers[] = {esi, ecx, edx, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ { |
+ CallInterfaceDescriptor* descriptor = |
+ isolate->call_descriptor(CallDescriptorKey::StringAddCall); |
+ Register registers[] = {esi, edx, eax}; |
+ descriptor->Initialize(arraysize(registers), registers, NULL); |
+ } |
+ |
{ |
CallInterfaceDescriptor* descriptor = |
isolate->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); |