From a177224f56ff822ee3e8a0ed3f23a4c1fca9c10c Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Thu, 4 Apr 2013 11:05:46 -0700 Subject: [PATCH] Bug 857856 - Make --enable-debug --disable-optimize --disable-ion --disable-methodjit build work again. r=sstangl --- js/src/configure.in | 2 +- js/src/methodjit/Logging.h | 50 +++++++++++++++----------------------- 2 files changed, 21 insertions(+), 31 deletions(-) diff --git a/js/src/configure.in b/js/src/configure.in index a4a8812654c8..f9af13d69596 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -3271,7 +3271,7 @@ MOZ_ARG_ENABLE_STRING(debug, (using compiler flags DBG)], [ if test "$enableval" != "no"; then MOZ_DEBUG=1 - if test "$ENABLE_METHODJIT"; then + if test "$ENABLE_METHODJIT" -o "$ENABLE_YARR_JIT"; then # needs MethodJIT or YarrJIT ENABLE_METHODJIT_SPEW=1 fi diff --git a/js/src/methodjit/Logging.h b/js/src/methodjit/Logging.h index c83797edba53..fff123e911ce 100644 --- a/js/src/methodjit/Logging.h +++ b/js/src/methodjit/Logging.h @@ -11,8 +11,6 @@ #include "assembler/wtf/Platform.h" #include "prmjtime.h" -#if defined(JS_METHODJIT) || ENABLE_YARR_JIT - namespace js { #define JSPEW_CHAN_MAP(_) \ @@ -36,13 +34,26 @@ enum JaegerSpewChannel { JSpew_Terminator }; -#if defined(DEBUG) && !defined(JS_METHODJIT_SPEW) -# define JS_METHODJIT_SPEW -#endif - -#if defined(JS_METHODJIT_SPEW) +#ifdef JS_METHODJIT_SPEW 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 { uint32_t oldBits; @@ -51,13 +62,6 @@ struct 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 { int64_t t_start; int64_t t_stop; @@ -83,22 +87,8 @@ struct Profiler { } }; -#else +#endif // JS_METHODJIT_SPEW -static inline bool IsJaegerSpewChannelActive(JaegerSpewChannel channel) -{ - return false; -} - -static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) -{ -} +} // namespace js #endif - -} - -#endif - -#endif -