Bug 682066 - Drop NS_DEFCALL. r=benjamin.
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Tue, 30 Aug 2011 14:22:00 -0400
changeset 77534 7fa469f47cbbaf2d3da4a6a382cbf644733ac41c
parent 77533 21a91ca8622754ae97ebe9660a7df836df186d74
child 77535 4d07f8ccbbaf941d9506bcf092ebcee978f1c594
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenjamin
bugs682066
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 682066 - Drop NS_DEFCALL. r=benjamin. Having NS_DEFCALL around causes problems for clang since it uses the regpart attribute when deciding template instantiations. In particular, it would not use the generic method specialization of nsRunnableMethodTraits.
xpcom/base/nscore.h
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -159,27 +159,16 @@
 #elif defined(XP_WIN) && !defined(_WIN64)
 #define NS_FASTCALL __fastcall
 #define NS_CONSTRUCTOR_FASTCALL
 #else
 #define NS_FASTCALL
 #define NS_CONSTRUCTOR_FASTCALL
 #endif
 
-/*
- * NS_DEFCALL undoes the effect of a global regparm/stdcall setting
- * so that xptcall works correctly.
- */
-#if defined(__i386__) && defined(__GNUC__) && \
-    (__GNUC__ >= 3) && !defined(XP_OS2)
-#define NS_DEFCALL __attribute__ ((regparm (0), cdecl))
-#else
-#define NS_DEFCALL
-#endif
-
 #ifdef NS_WIN32
 
 #define NS_IMPORT __declspec(dllimport)
 #define NS_IMPORT_(type) __declspec(dllimport) type __stdcall
 #define NS_EXPORT __declspec(dllexport)
 #define NS_EXPORT_(type) __declspec(dllexport) type __stdcall
 #define NS_IMETHOD_(type) virtual type __stdcall
 #define NS_IMETHODIMP_(type) type __stdcall
@@ -212,17 +201,17 @@
 #define NS_IMPORT_STATIC_MEMBER_(type) NS_EXTERNAL_VIS_(type)
 
 #else
 
 #define NS_IMPORT NS_EXTERNAL_VIS
 #define NS_IMPORT_(type) NS_EXTERNAL_VIS_(type)
 #define NS_EXPORT NS_EXTERNAL_VIS
 #define NS_EXPORT_(type) NS_EXTERNAL_VIS_(type)
-#define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type NS_DEFCALL
+#define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type
 #define NS_IMETHODIMP_(type) type
 #define NS_METHOD_(type) type
 #define NS_CALLBACK_(_type, _name) _type (* _name)
 #define NS_STDCALL
 #define NS_FROZENCALL
 #define NS_EXPORT_STATIC_MEMBER_(type) NS_EXTERNAL_VIS_(type)
 #define NS_IMPORT_STATIC_MEMBER_(type) NS_EXTERNAL_VIS_(type)