From 693d8aa482b342c4db56cecd881965c0004d2b2b Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 15 May 2012 07:44:58 +0200 Subject: [PATCH] Bug 754557 - Fix building with --enable-methodjit-spew without --enable-debug. r=dmandelin --- js/src/Makefile.in | 2 +- js/src/config/autoconf.mk.in | 1 + js/src/configure.in | 10 ++++++---- js/src/jsanalyze.cpp | 2 +- js/src/jsanalyze.h | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/js/src/Makefile.in b/js/src/Makefile.in index f3ee0b37f21..f3092dc138d 100644 --- a/js/src/Makefile.in +++ b/js/src/Makefile.in @@ -338,7 +338,7 @@ CPPSRCS += ExecutableAllocator.cpp \ YarrSyntaxChecker.cpp \ $(NONE) -ifdef MOZ_DEBUG +ifdef ENABLE_METHODJIT_SPEW CPPSRCS += Logging.cpp endif diff --git a/js/src/config/autoconf.mk.in b/js/src/config/autoconf.mk.in index 865c9dcf092..f5aede8f413 100644 --- a/js/src/config/autoconf.mk.in +++ b/js/src/config/autoconf.mk.in @@ -329,6 +329,7 @@ VISIBILITY_FLAGS = @VISIBILITY_FLAGS@ WRAP_SYSTEM_INCLUDES = @WRAP_SYSTEM_INCLUDES@ ENABLE_METHODJIT = @ENABLE_METHODJIT@ +ENABLE_METHODJIT_SPEW = @ENABLE_METHODJIT_SPEW@ HAVE_ARM_SIMD= @HAVE_ARM_SIMD@ JS_SHARED_LIBRARY = @JS_SHARED_LIBRARY@ diff --git a/js/src/configure.in b/js/src/configure.in index e531adf8691..7d02f29e004 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -2668,6 +2668,7 @@ MOZ_ARG_ENABLE_BOOL(methodjit-spew, ENABLE_METHODJIT_SPEW= ) AC_SUBST(ENABLE_METHODJIT) +AC_SUBST(ENABLE_METHODJIT_SPEW) if test "$ENABLE_METHODJIT"; then AC_DEFINE(JS_METHODJIT) @@ -2685,10 +2686,6 @@ if test "$ENABLE_METHODJIT_TYPED_ARRAY"; then AC_DEFINE(JS_METHODJIT_TYPED_ARRAY) fi -if test "$ENABLE_METHODJIT_SPEW"; then - AC_DEFINE(JS_METHODJIT_SPEW) -fi - if test -z "$SKIP_COMPILER_CHECKS"; then dnl Checks for typedefs, structures, and compiler characteristics. dnl ======================================================== @@ -3882,6 +3879,7 @@ MOZ_ARG_ENABLE_STRING(debug, (using compiler flags DBG)], [ if test "$enableval" != "no"; then MOZ_DEBUG=1 + ENABLE_METHODJIT_SPEW=1 if test -n "$enableval" -a "$enableval" != "yes"; then MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'` _MOZ_DEBUG_FLAGS_SET=1 @@ -3917,6 +3915,10 @@ if test -n "$MOZ_DEBUG"; then CFLAGS=$_SAVE_CFLAGS fi +if test "$ENABLE_METHODJIT_SPEW"; then + AC_DEFINE(JS_METHODJIT_SPEW) +fi + dnl ======================================================== dnl = Enable code optimization. ON by default. dnl ======================================================== diff --git a/js/src/jsanalyze.cpp b/js/src/jsanalyze.cpp index 5fd317a92b4..1090db8b2cd 100644 --- a/js/src/jsanalyze.cpp +++ b/js/src/jsanalyze.cpp @@ -978,7 +978,7 @@ ScriptAnalysis::analyzeLifetimes(JSContext *cx) ranLifetimes_ = true; } -#ifdef DEBUG +#ifdef JS_METHODJIT_SPEW void LifetimeVariable::print() const { diff --git a/js/src/jsanalyze.h b/js/src/jsanalyze.h index 057a0c645b8..6fb6ee0de18 100644 --- a/js/src/jsanalyze.h +++ b/js/src/jsanalyze.h @@ -612,7 +612,7 @@ struct LifetimeVariable return offset; } -#ifdef DEBUG +#ifdef JS_METHODJIT_SPEW void print() const; #endif };