Bug 411301 Fix the build for s390/s390x Update the xptcall code to use the new API from 349002 r=bsmedberg a=schrep
authorcaillon@redhat.com
Sat, 19 Jan 2008 13:09:25 -0800
changeset 10443 6d71b3d2977c5788522aba86d6973a47cdd6c49a
parent 10442 abf4de72d93eee2b35a8022d9a8263e123d1fd48
child 10444 000b156b4cb3503b1fc996fed4426b8d45f114c9
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, schrep
bugs411301, 349002
milestone1.9b3pre
Bug 411301 Fix the build for s390/s390x Update the xptcall code to use the new API from 349002 r=bsmedberg a=schrep
xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp
xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
--- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp
@@ -195,19 +195,19 @@ invoke_copy_to_stack(PRUint32 paramCount
                 *((void**)   d_gpr) = s->val.p, d_gpr++, gpr++;
             else
                 *((void**)   d_ov ) = s->val.p, d_ov++;
             break;
         }
     }
 }
 
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
+EXPORT_XPCOM_API(nsresult)
+NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+                 PRUint32 paramCount, nsXPTCVariant* params)
 {
     PRUint32 *vtable = *(PRUint32 **)that;
 #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
     PRUint32 method = vtable[methodIndex];
 #else /* not G++ V3 ABI  */
     PRUint32 method = vtable[methodIndex + 2];
 #endif /* G++ V3 ABI */ 
     PRUint32 overflow = invoke_count_words (paramCount, params);
@@ -246,9 +246,10 @@ XPTC_InvokeByIndex(nsISupports* that, PR
           "r" (overflow),
           "a" (invoke_copy_to_stack),
           "a" (that),
           "a" (method)
         : "2", "3", "4", "5", "6", "7", "14", "cc", "memory", "%f0", "%f2"
     );
   
     return result;
-}    
+}
+
--- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp
@@ -189,19 +189,19 @@ invoke_copy_to_stack(PRUint32 paramCount
                 *((void**)   d_gpr) = s->val.p, d_gpr++, gpr++;
             else
                 *((void**)   d_ov ) = s->val.p, d_ov++;
             break;
         }
     }
 }
 
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-                   PRUint32 paramCount, nsXPTCVariant* params)
+EXPORT_XPCOM_API(nsresult)
+NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+                 PRUint32 paramCount, nsXPTCVariant* params)
 {
     PRUint64 *vtable = *(PRUint64 **)that;
 #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
     PRUint64 method = vtable[methodIndex];
 #else /* not G++ V3 ABI  */
     PRUint64 method = vtable[methodIndex + 2];
 #endif /* G++ V3 ABI */
     PRUint64 overflow = invoke_count_words (paramCount, params);
@@ -243,9 +243,10 @@ XPTC_InvokeByIndex(nsISupports* that, PR
           "a" (invoke_copy_to_stack),
           "a" (that),
           "a" (method)
         : "2", "3", "4", "5", "6", "7", "14", "cc", "memory",
 	  "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7"
     );
   
     return result;
-}    
+}
+
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
@@ -34,38 +34,35 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 /* Implement shared vtbl methods. */
 
 #include "xptcprivate.h"
+#include "xptiprivate.h"
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, 
                    PRUint32* a_gpr, PRUint64 *a_fpr, PRUint32 *a_ov)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
     const nsXPTMethodInfo* info;
     PRUint8 paramCount;
     PRUint8 i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
-    NS_ASSERTION(info,"no interface info");
+    self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
+    NS_ASSERTION(info,"no info");
 
     paramCount = info->GetParamCount();
 
     // setup variant array pointer
     if(paramCount > PARAM_BUFFER_COUNT)
         dispatchParams = new nsXPTCMiniVariant[paramCount];
     else
         dispatchParams = paramBuffer;
@@ -169,19 +166,17 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                 dp->val.wc  = *((PRUint32*)a_ov ), a_ov++;
             break;
         default:
             NS_ASSERTION(0, "bad type");
             break;
         }
     }
 
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
+    result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n) \
--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
@@ -34,38 +34,35 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 /* Implement shared vtbl methods. */
 
 #include "xptcprivate.h"
+#include "xptiprivate.h"
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, 
                    PRUint64* a_gpr, PRUint64 *a_fpr, PRUint64 *a_ov)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = NULL;
-    nsIInterfaceInfo* iface_info = NULL;
     const nsXPTMethodInfo* info;
     PRUint8 paramCount;
     PRUint8 i;
     nsresult result = NS_ERROR_FAILURE;
 
     NS_ASSERTION(self,"no self");
 
-    self->GetInterfaceInfo(&iface_info);
-    NS_ASSERTION(iface_info,"no interface info");
-
-    iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
-    NS_ASSERTION(info,"no interface info");
+    self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
+    NS_ASSERTION(info,"no info");
 
     paramCount = info->GetParamCount();
 
     // setup variant array pointer
     if(paramCount > PARAM_BUFFER_COUNT)
         dispatchParams = new nsXPTCMiniVariant[paramCount];
     else
         dispatchParams = paramBuffer;
@@ -169,19 +166,17 @@ PrepareAndDispatch(nsXPTCStubBase* self,
                 dp->val.wc  = *((PRUint64*)a_ov ), a_ov++;
             break;
         default:
             NS_ASSERTION(0, "bad type");
             break;
         }
     }
 
-    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
-
-    NS_RELEASE(iface_info);
+    result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
 
     if(dispatchParams != paramBuffer)
         delete [] dispatchParams;
 
     return result;
 }
 
 #define STUB_ENTRY(n) \