Unify InstanceofStub interface descriptors.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 31 Jul 2014 12:07:30 +0000 (12:07 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 31 Jul 2014 12:07:30 +0000 (12:07 +0000)
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

src/arm/code-stubs-arm.cc
src/arm64/code-stubs-arm64.cc
src/code-stubs.cc
src/code-stubs.h
src/compiler/js-generic-lowering.cc
src/ia32/code-stubs-ia32.cc
src/mips/code-stubs-mips.cc
src/x64/code-stubs-x64.cc

index 919a4ec..6b807b2 100644 (file)
@@ -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
index f745975..ef241be 100644 (file)
@@ -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
index f23c80b..fc3ad94 100644 (file)
@@ -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);
 }
index d4a2152..6f2ce63 100644 (file)
@@ -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_;
index 4679e4c..3526715 100644 (file)
@@ -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;
 }
 
index 0057436..cd034ed 100644 (file)
@@ -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
index 0e55fe7..4074f89 100644 (file)
@@ -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();
 }
 
index e3d5420..d0fd335 100644 (file)
@@ -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