diff --git a/js/src/jstracer.h b/js/src/jstracer.h index dc69442d3c0..8dde554e82d 100644 --- a/js/src/jstracer.h +++ b/js/src/jstracer.h @@ -163,7 +163,7 @@ public: void clear(); }; -#ifdef JS_JIT_SPEW +#if defined(JS_JIT_SPEW) || defined(MOZ_NO_VARADIC_MACROS) enum LC_TMBits { /* Output control bits for all non-Nanojit code. Only use bits 16 @@ -177,6 +177,16 @@ enum LC_TMBits { LC_TMRegexp = 1<<22 }; +#endif + +#ifdef MOZ_NO_VARADIC_MACROS + +#define debug_only_stmt(action) /* */ +static void debug_only_printf(int mask, const char *fmt, ...) {} +#define debug_only_print0(mask, str) /* */ + +#elif defined(JS_JIT_SPEW) + // Top level logging controller object. extern nanojit::LogControl js_LogController; @@ -229,7 +239,7 @@ public: }; -#if defined(_MSC_VER) || defined(__GNUC__) +#if defined(_MSC_VER) && _MSC_VER >= 1400 || defined(__GNUC__) #define USE_TRACE_TYPE_ENUM #endif @@ -246,7 +256,7 @@ public: * this requirement is correctly enforced by these compilers. */ enum JSTraceType_ -#ifdef _MSC_VER +#if defined(_MSC_VER) && _MSC_VER >= 1400 : int8_t #endif { diff --git a/js/src/jstypes.h b/js/src/jstypes.h index 28a9b83bad0..04e801fc2b6 100644 --- a/js/src/jstypes.h +++ b/js/src/jstypes.h @@ -280,6 +280,9 @@ #ifdef _MSC_VER # include "jscpucfg.h" /* We can't auto-detect MSVC configuration */ +# if _MSC_VER < 1400 +# define MOZ_NO_VARADIC_MACROS +# endif #else # include "jsautocfg.h" /* Use auto-detected configuration */ #endif diff --git a/js/src/nanojit/Assembler.cpp b/js/src/nanojit/Assembler.cpp index 150f6389670..f0f81bbcd67 100644 --- a/js/src/nanojit/Assembler.cpp +++ b/js/src/nanojit/Assembler.cpp @@ -790,9 +790,9 @@ namespace nanojit // Used for debug printing, if needed verbose_only( - ReverseLister *pp_init = NULL, - *pp_after_sf1 = NULL, - *pp_after_sf2 = NULL; + ReverseLister *pp_init = NULL; + ReverseLister *pp_after_sf1 = NULL; + ReverseLister *pp_after_sf2 = NULL; ) // set up backwards pipeline: assembler -> StackFilter -> LirReader diff --git a/js/src/nanojit/Native.h b/js/src/nanojit/Native.h index 55224ce1df8..23eb9c7d5e5 100644 --- a/js/src/nanojit/Native.h +++ b/js/src/nanojit/Native.h @@ -95,7 +95,7 @@ namespace nanojit { #define isSPorFP(r) ( (r)==SP || (r)==FP ) - #if defined(_MSC_VER) && _MSC_VER < 1400 + #ifdef MOZ_NO_VARADIC_MACROS static void asm_output(const char *f, ...) {} #define gpn(r) regNames[(r)] #define fpn(r) regNames[(r)] diff --git a/js/src/nanojit/avmplus.h b/js/src/nanojit/avmplus.h index e9db5d22778..53f472f554b 100644 --- a/js/src/nanojit/avmplus.h +++ b/js/src/nanojit/avmplus.h @@ -76,7 +76,7 @@ #include #endif -#if defined(DEBUG) || defined(_MSC_VER) && _MSC_VER < 1400 +#if defined(DEBUG) || defined(MOZ_NO_VARADIC_MACROS) #if !defined _DEBUG #define _DEBUG #endif diff --git a/js/src/nanojit/nanojit.h b/js/src/nanojit/nanojit.h index 68e8a20c36a..6e27b20d899 100644 --- a/js/src/nanojit/nanojit.h +++ b/js/src/nanojit/nanojit.h @@ -131,7 +131,7 @@ namespace nanojit const uint32_t MAXARGS = 8; - #if defined(_MSC_VER) && _MSC_VER < 1400 + #ifdef MOZ_NO_VARADIC_MACROS static void NanoAssertMsgf(bool a,const char *f,...) {} static void NanoAssertMsg(bool a,const char *m) {} static void NanoAssert(bool a) {} @@ -180,7 +180,7 @@ namespace nanojit #define NJ_PROFILE 1 #endif -#if defined(_MSC_VER) && _MSC_VER < 1400 +#ifdef MOZ_NO_VARADIC_MACROS #include #define verbose_outputf if (_logc->lcbits & LC_Assembly) \ Assembler::outputf