Bug 857856 - Make --enable-debug --disable-optimize --disable-ion --disable-methodjit build work again. r=sstangl

This commit is contained in:
Jeff Walden 2013-04-04 11:05:46 -07:00
parent aabd1766c9
commit a177224f56
2 changed files with 21 additions and 31 deletions

View File

@ -3271,7 +3271,7 @@ MOZ_ARG_ENABLE_STRING(debug,
(using compiler flags DBG)], (using compiler flags DBG)],
[ if test "$enableval" != "no"; then [ if test "$enableval" != "no"; then
MOZ_DEBUG=1 MOZ_DEBUG=1
if test "$ENABLE_METHODJIT"; then if test "$ENABLE_METHODJIT" -o "$ENABLE_YARR_JIT"; then
# needs MethodJIT or YarrJIT # needs MethodJIT or YarrJIT
ENABLE_METHODJIT_SPEW=1 ENABLE_METHODJIT_SPEW=1
fi fi

View File

@ -11,8 +11,6 @@
#include "assembler/wtf/Platform.h" #include "assembler/wtf/Platform.h"
#include "prmjtime.h" #include "prmjtime.h"
#if defined(JS_METHODJIT) || ENABLE_YARR_JIT
namespace js { namespace js {
#define JSPEW_CHAN_MAP(_) \ #define JSPEW_CHAN_MAP(_) \
@ -36,13 +34,26 @@ enum JaegerSpewChannel {
JSpew_Terminator JSpew_Terminator
}; };
#if defined(DEBUG) && !defined(JS_METHODJIT_SPEW) #ifdef JS_METHODJIT_SPEW
# define JS_METHODJIT_SPEW
#endif
#if defined(JS_METHODJIT_SPEW)
void JMCheckLogging(); void JMCheckLogging();
bool IsJaegerSpewChannelActive(JaegerSpewChannel channel);
#ifdef __GNUC__
void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
#else
void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...);
#endif
#else
static inline void JMCheckLogging() {}
static inline bool IsJaegerSpewChannelActive(JaegerSpewChannel channel) { return false; }
static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) {}
#endif // JS_METHODJIT_SPEW
#if defined(JS_METHODJIT_SPEW)
struct ConditionalLog { struct ConditionalLog {
uint32_t oldBits; uint32_t oldBits;
@ -51,13 +62,6 @@ struct ConditionalLog {
~ConditionalLog(); ~ConditionalLog();
}; };
bool IsJaegerSpewChannelActive(JaegerSpewChannel channel);
#ifdef __GNUC__
void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
#else
void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...);
#endif
struct Profiler { struct Profiler {
int64_t t_start; int64_t t_start;
int64_t t_stop; int64_t t_stop;
@ -83,22 +87,8 @@ struct Profiler {
} }
}; };
#else #endif // JS_METHODJIT_SPEW
static inline bool IsJaegerSpewChannelActive(JaegerSpewChannel channel) } // namespace js
{
return false;
}
static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...)
{
}
#endif #endif
}
#endif
#endif