Bug 501609 Make js/src build with VC7.1 r=graydon

This commit is contained in:
Neil Rashbrook 2009-07-15 20:31:26 +01:00
parent 78cacddb37
commit 7d7253ddaa
6 changed files with 23 additions and 10 deletions

View File

@ -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
{

View File

@ -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

View File

@ -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

View File

@ -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)]

View File

@ -76,7 +76,7 @@
#include <windows.h>
#endif
#if defined(DEBUG) || defined(_MSC_VER) && _MSC_VER < 1400
#if defined(DEBUG) || defined(MOZ_NO_VARADIC_MACROS)
#if !defined _DEBUG
#define _DEBUG
#endif

View File

@ -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 <stdio.h>
#define verbose_outputf if (_logc->lcbits & LC_Assembly) \
Assembler::outputf