Bug 626716 Remove use of NJ_NO_VARIADIC_MACROS from Nanojit r=njn,edwsmith
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Wed, 16 Feb 2011 23:53:30 +0000
changeset 64181 7d3160757f82f0220fc083e4ef832f6cb5644cb5
parent 64180 26ca4473084a0e171094944c1d449929f7aaca5e
child 64182 b7e5ed574a1f1d0e979ac4182cc7dae415503d5f
push id19328
push usercleary@mozilla.com
push dateTue, 29 Mar 2011 21:56:11 +0000
treeherdermozilla-central@3d0784802ce6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn, edwsmith
bugs626716
milestone2.0b13pre
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 626716 Remove use of NJ_NO_VARIADIC_MACROS from Nanojit r=njn,edwsmith
js/src/nanojit/Native.h
js/src/nanojit/avmplus.h
js/src/nanojit/nanojit.h
--- a/js/src/nanojit/Native.h
+++ b/js/src/nanojit/Native.h
@@ -133,20 +133,17 @@ namespace nanojit {
             gr->next = guards;
             guards = gr;
         }
     };
 }
 
     #define isSPorFP(r)     ( (r)==SP || (r)==FP )
 
-    #ifdef NJ_NO_VARIADIC_MACROS
-        static void asm_output(const char *f, ...) {}
-        #define gpn(r)                    regNames[(REGNUM(n))]
-    #elif defined(NJ_VERBOSE)
+    #if defined(NJ_VERBOSE)
         inline char cvaltoa(unsigned char u) {
             return u<10 ? u+'0' : u+'a'-10;
         }
 
         inline char* appendHexVals(char* str, char* valFrom, char* valTo) {
             NanoAssert(valFrom <= valTo);
             str += VMPI_strlen(str);
             for(char* ch = valFrom; ch < valTo; ch++) {
--- a/js/src/nanojit/avmplus.h
+++ b/js/src/nanojit/avmplus.h
@@ -78,17 +78,17 @@
 #endif
 
 #if defined(__SUNPRO_CC)
 #define __asm__ asm
 #define __volatile__ volatile
 #define __inline__ inline
 #endif
 
-#if defined(DEBUG) || defined(NJ_NO_VARIADIC_MACROS)
+#if defined(DEBUG)
 #if !defined _DEBUG
 #define _DEBUG
 #endif
 #define NJ_VERBOSE 1
 #include <stdarg.h>
 #endif
 
 #ifdef _DEBUG
--- a/js/src/nanojit/nanojit.h
+++ b/js/src/nanojit/nanojit.h
@@ -100,21 +100,17 @@ namespace nanojit
      * -------------------------------------------
      * START AVM bridging definitions
      * -------------------------------------------
      */
     typedef avmplus::AvmCore AvmCore;
 
     const uint32_t MAXARGS = 8;
 
-    #ifdef NJ_NO_VARIADIC_MACROS
-        inline void NanoAssertMsgf(bool a,const char *f,...) {}
-        inline void NanoAssertMsg(bool a,const char *m) {}
-        inline void NanoAssert(bool a) {}
-    #elif defined(_DEBUG)
+    #if defined(_DEBUG)
 
         #define __NanoAssertMsgf(a, file_, line_, f, ...)  \
             if (!(a)) { \
                 avmplus::AvmLog("Assertion failure: " f "%s (%s:%d)\n", __VA_ARGS__, #a, file_, line_); \
                 avmplus::AvmAssertFail(""); \
             }
 
         #define _NanoAssertMsgf(a, file_, line_, f, ...)   __NanoAssertMsgf(a, file_, line_, f, __VA_ARGS__)
@@ -148,22 +144,17 @@ namespace nanojit
      * -------------------------------------------
      */
 }
 
 #ifdef AVMPLUS_VERBOSE
     #define NJ_VERBOSE 1
 #endif
 
-#ifdef NJ_NO_VARIADIC_MACROS
-    #include <stdio.h>
-    #define verbose_outputf            if (_logc->lcbits & LC_Native) \
-                                        Assembler::outputf
-    #define verbose_only(x)            x
-#elif defined(NJ_VERBOSE)
+#if defined(NJ_VERBOSE)
     #include <stdio.h>
     #define verbose_outputf            if (_logc->lcbits & LC_Native) \
                                         Assembler::outputf
     #define verbose_only(...)        __VA_ARGS__
 #else
     #define verbose_outputf
     #define verbose_only(...)
 #endif /*NJ_VERBOSE*/