Unify InstanceofStub interface descriptors.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/437483003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 61448495
......@@ -78,15 +78,8 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
}
void InstanceofStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {cp, left(), right()};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
}
void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
// r1 function the function to call
Register registers[] = {cp, r1};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
......@@ -94,7 +87,7 @@ void CallFunctionStub::InitializeInterfaceDescriptor(
void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
// r0 : number of arguments
// r1 : the function to call
// r2 : feedback vector
......
......@@ -97,15 +97,8 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
}
void InstanceofStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {cp, left(), right()};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
}
void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
// x1 function the function to call
Register registers[] = {cp, x1};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
......@@ -113,7 +106,7 @@ void CallFunctionStub::InitializeInterfaceDescriptor(
void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
// x0 : number of arguments
// x1 : the function to call
// x2 : feedback vector
......
......@@ -664,6 +664,15 @@ void StoreGlobalStub::InitializeInterfaceDescriptor(
}
void InstanceofStub::InitializeInterfaceDescriptor(
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = { InterfaceDescriptor::ContextRegister(),
InstanceofStub::left(),
InstanceofStub::right() };
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
}
void LoadDictionaryElementPlatformStub::Generate(MacroAssembler* masm) {
ElementHandlerCompiler::GenerateLoadDictionaryElement(masm);
}
......
......@@ -747,7 +747,7 @@ class InstanceofStub: public PlatformCodeStub {
void Generate(MacroAssembler* masm);
virtual void InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor);
CodeStubInterfaceDescriptor* descriptor);
private:
Major MajorKey() const { return Instanceof; }
......@@ -1628,7 +1628,7 @@ class CallFunctionStub: public PlatformCodeStub {
}
virtual void InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor);
CodeStubInterfaceDescriptor* descriptor);
private:
int argc_;
......@@ -1670,7 +1670,7 @@ class CallConstructStub: public PlatformCodeStub {
}
virtual void InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor);
CodeStubInterfaceDescriptor* descriptor);
private:
CallConstructorFlags flags_;
......
......@@ -24,7 +24,7 @@ static CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate,
T* stub) {
CodeStub::Major key = static_cast<CodeStub*>(stub)->MajorKey();
CodeStubInterfaceDescriptor* d = isolate->code_stub_interface_descriptor(key);
stub->InitializeInterfaceDescriptor(isolate, d);
stub->InitializeInterfaceDescriptor(d);
return d;
}
......
......@@ -84,22 +84,15 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
}
void InstanceofStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {esi, left(), right()};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
}
void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {esi, edi};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
}
void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
// eax : number of arguments
// ebx : feedback vector
// edx : (only if ebx is not the megamorphic symbol) slot in feedback
......
......@@ -79,20 +79,14 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
}
void InstanceofStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
UNIMPLEMENTED();
}
void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
UNIMPLEMENTED();
}
void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
UNIMPLEMENTED();
}
......
......@@ -80,22 +80,15 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
}
void InstanceofStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {rsi, left(), right()};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
}
void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {rsi, rdi};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
}
void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
CodeStubInterfaceDescriptor* descriptor) {
// rax : number of arguments
// rbx : feedback vector
// rdx : (only if rbx is not the megamorphic symbol) slot in feedback
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment