Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: src/x64/interface-descriptors-x64.cc

Issue 523583002: Multiple stubs can point to the same calling convention. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698