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( ...@@ -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( void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
// r1 function the function to call // r1 function the function to call
Register registers[] = {cp, r1}; Register registers[] = {cp, r1};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
...@@ -94,7 +87,7 @@ void CallFunctionStub::InitializeInterfaceDescriptor( ...@@ -94,7 +87,7 @@ void CallFunctionStub::InitializeInterfaceDescriptor(
void CallConstructStub::InitializeInterfaceDescriptor( void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
// r0 : number of arguments // r0 : number of arguments
// r1 : the function to call // r1 : the function to call
// r2 : feedback vector // r2 : feedback vector
......
...@@ -97,15 +97,8 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
// x1 function the function to call // x1 function the function to call
Register registers[] = {cp, x1}; Register registers[] = {cp, x1};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
...@@ -113,7 +106,7 @@ void CallFunctionStub::InitializeInterfaceDescriptor( ...@@ -113,7 +106,7 @@ void CallFunctionStub::InitializeInterfaceDescriptor(
void CallConstructStub::InitializeInterfaceDescriptor( void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
// x0 : number of arguments // x0 : number of arguments
// x1 : the function to call // x1 : the function to call
// x2 : feedback vector // x2 : feedback vector
......
...@@ -664,6 +664,15 @@ void StoreGlobalStub::InitializeInterfaceDescriptor( ...@@ -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) { void LoadDictionaryElementPlatformStub::Generate(MacroAssembler* masm) {
ElementHandlerCompiler::GenerateLoadDictionaryElement(masm); ElementHandlerCompiler::GenerateLoadDictionaryElement(masm);
} }
......
...@@ -747,7 +747,7 @@ class InstanceofStub: public PlatformCodeStub { ...@@ -747,7 +747,7 @@ class InstanceofStub: public PlatformCodeStub {
void Generate(MacroAssembler* masm); void Generate(MacroAssembler* masm);
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor); CodeStubInterfaceDescriptor* descriptor);
private: private:
Major MajorKey() const { return Instanceof; } Major MajorKey() const { return Instanceof; }
...@@ -1628,7 +1628,7 @@ class CallFunctionStub: public PlatformCodeStub { ...@@ -1628,7 +1628,7 @@ class CallFunctionStub: public PlatformCodeStub {
} }
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor); CodeStubInterfaceDescriptor* descriptor);
private: private:
int argc_; int argc_;
...@@ -1670,7 +1670,7 @@ class CallConstructStub: public PlatformCodeStub { ...@@ -1670,7 +1670,7 @@ class CallConstructStub: public PlatformCodeStub {
} }
virtual void InitializeInterfaceDescriptor( virtual void InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor); CodeStubInterfaceDescriptor* descriptor);
private: private:
CallConstructorFlags flags_; CallConstructorFlags flags_;
......
...@@ -24,7 +24,7 @@ static CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate, ...@@ -24,7 +24,7 @@ static CodeStubInterfaceDescriptor* GetInterfaceDescriptor(Isolate* isolate,
T* stub) { T* stub) {
CodeStub::Major key = static_cast<CodeStub*>(stub)->MajorKey(); CodeStub::Major key = static_cast<CodeStub*>(stub)->MajorKey();
CodeStubInterfaceDescriptor* d = isolate->code_stub_interface_descriptor(key); CodeStubInterfaceDescriptor* d = isolate->code_stub_interface_descriptor(key);
stub->InitializeInterfaceDescriptor(isolate, d); stub->InitializeInterfaceDescriptor(d);
return d; return d;
} }
......
...@@ -84,22 +84,15 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {esi, edi}; Register registers[] = {esi, edi};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
} }
void CallConstructStub::InitializeInterfaceDescriptor( void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
// eax : number of arguments // eax : number of arguments
// ebx : feedback vector // ebx : feedback vector
// edx : (only if ebx is not the megamorphic symbol) slot in feedback // edx : (only if ebx is not the megamorphic symbol) slot in feedback
......
...@@ -79,20 +79,14 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -79,20 +79,14 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor(
} }
void InstanceofStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) {
UNIMPLEMENTED();
}
void CallFunctionStub::InitializeInterfaceDescriptor( void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void CallConstructStub::InitializeInterfaceDescriptor( void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
......
...@@ -80,22 +80,15 @@ void CreateAllocationSiteStub::InitializeInterfaceDescriptor( ...@@ -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( void CallFunctionStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
Register registers[] = {rsi, rdi}; Register registers[] = {rsi, rdi};
descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers);
} }
void CallConstructStub::InitializeInterfaceDescriptor( void CallConstructStub::InitializeInterfaceDescriptor(
Isolate* isolate, CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
// rax : number of arguments // rax : number of arguments
// rbx : feedback vector // rbx : feedback vector
// rdx : (only if rbx is not the megamorphic symbol) slot in feedback // 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