X87: Cleanup CallInterfaceDescriptor
port r22014 original commit message: Make CallInterfaceDescriptor work like CodeStubInterfaceDescriptor, owning it's register and representation arrays. This also eliminates a host of TSAN warnings xfor static arrays This CL depends on https://codereview.chromium.org/352583002 landing first (a conceptual dependency at least). BUG= R=weiliang.lin@intel.com Review URL: https://codereview.chromium.org/343563006 Patch from Chunyang Dai <chunyang.dai@intel.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
a2d15ce518
commit
2c45989333
@ -309,82 +309,72 @@ void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
|
|||||||
{
|
{
|
||||||
CallInterfaceDescriptor* descriptor =
|
CallInterfaceDescriptor* descriptor =
|
||||||
isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
|
isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
|
||||||
static Register registers[] = { edi, // JSFunction
|
Register registers[] = { edi, // JSFunction
|
||||||
esi, // context
|
esi, // context
|
||||||
eax, // actual number of arguments
|
eax, // actual number of arguments
|
||||||
ebx, // expected number of arguments
|
ebx, // expected number of arguments
|
||||||
};
|
};
|
||||||
static Representation representations[] = {
|
Representation representations[] = {
|
||||||
Representation::Tagged(), // JSFunction
|
Representation::Tagged(), // JSFunction
|
||||||
Representation::Tagged(), // context
|
Representation::Tagged(), // context
|
||||||
Representation::Integer32(), // actual number of arguments
|
Representation::Integer32(), // actual number of arguments
|
||||||
Representation::Integer32(), // expected number of arguments
|
Representation::Integer32(), // expected number of arguments
|
||||||
};
|
};
|
||||||
descriptor->register_param_count_ = 4;
|
descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
|
||||||
descriptor->register_params_ = registers;
|
|
||||||
descriptor->param_representations_ = representations;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
CallInterfaceDescriptor* descriptor =
|
CallInterfaceDescriptor* descriptor =
|
||||||
isolate->call_descriptor(Isolate::KeyedCall);
|
isolate->call_descriptor(Isolate::KeyedCall);
|
||||||
static Register registers[] = { esi, // context
|
Register registers[] = { esi, // context
|
||||||
ecx, // key
|
ecx, // key
|
||||||
};
|
};
|
||||||
static Representation representations[] = {
|
Representation representations[] = {
|
||||||
Representation::Tagged(), // context
|
Representation::Tagged(), // context
|
||||||
Representation::Tagged(), // key
|
Representation::Tagged(), // key
|
||||||
};
|
};
|
||||||
descriptor->register_param_count_ = 2;
|
descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
|
||||||
descriptor->register_params_ = registers;
|
|
||||||
descriptor->param_representations_ = representations;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
CallInterfaceDescriptor* descriptor =
|
CallInterfaceDescriptor* descriptor =
|
||||||
isolate->call_descriptor(Isolate::NamedCall);
|
isolate->call_descriptor(Isolate::NamedCall);
|
||||||
static Register registers[] = { esi, // context
|
Register registers[] = { esi, // context
|
||||||
ecx, // name
|
ecx, // name
|
||||||
};
|
};
|
||||||
static Representation representations[] = {
|
Representation representations[] = {
|
||||||
Representation::Tagged(), // context
|
Representation::Tagged(), // context
|
||||||
Representation::Tagged(), // name
|
Representation::Tagged(), // name
|
||||||
};
|
};
|
||||||
descriptor->register_param_count_ = 2;
|
descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
|
||||||
descriptor->register_params_ = registers;
|
|
||||||
descriptor->param_representations_ = representations;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
CallInterfaceDescriptor* descriptor =
|
CallInterfaceDescriptor* descriptor =
|
||||||
isolate->call_descriptor(Isolate::CallHandler);
|
isolate->call_descriptor(Isolate::CallHandler);
|
||||||
static Register registers[] = { esi, // context
|
Register registers[] = { esi, // context
|
||||||
edx, // receiver
|
edx, // receiver
|
||||||
};
|
};
|
||||||
static Representation representations[] = {
|
Representation representations[] = {
|
||||||
Representation::Tagged(), // context
|
Representation::Tagged(), // context
|
||||||
Representation::Tagged(), // receiver
|
Representation::Tagged(), // receiver
|
||||||
};
|
};
|
||||||
descriptor->register_param_count_ = 2;
|
descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
|
||||||
descriptor->register_params_ = registers;
|
|
||||||
descriptor->param_representations_ = representations;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
CallInterfaceDescriptor* descriptor =
|
CallInterfaceDescriptor* descriptor =
|
||||||
isolate->call_descriptor(Isolate::ApiFunctionCall);
|
isolate->call_descriptor(Isolate::ApiFunctionCall);
|
||||||
static Register registers[] = { eax, // callee
|
Register registers[] = { eax, // callee
|
||||||
ebx, // call_data
|
ebx, // call_data
|
||||||
ecx, // holder
|
ecx, // holder
|
||||||
edx, // api_function_address
|
edx, // api_function_address
|
||||||
esi, // context
|
esi, // context
|
||||||
};
|
};
|
||||||
static Representation representations[] = {
|
Representation representations[] = {
|
||||||
Representation::Tagged(), // callee
|
Representation::Tagged(), // callee
|
||||||
Representation::Tagged(), // call_data
|
Representation::Tagged(), // call_data
|
||||||
Representation::Tagged(), // holder
|
Representation::Tagged(), // holder
|
||||||
Representation::External(), // api_function_address
|
Representation::External(), // api_function_address
|
||||||
Representation::Tagged(), // context
|
Representation::Tagged(), // context
|
||||||
};
|
};
|
||||||
descriptor->register_param_count_ = 5;
|
descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
|
||||||
descriptor->register_params_ = registers;
|
|
||||||
descriptor->param_representations_ = representations;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user