From 41a6158c570106a1d30c548fda965e04ea71db3d Mon Sep 17 00:00:00 2001 From: "shaver@mozilla.org" Date: Tue, 12 Aug 2008 12:09:59 -0400 Subject: [PATCH] fix build for !JS_TRACER, both threaded and switch interps --- js/src/jsgc.cpp | 2 ++ js/src/jsinterp.cpp | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 43d113656cb..f568012bbdc 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -3202,7 +3202,9 @@ js_GC(JSContext *cx, JSGCInvocationKind gckind) /* Clear property and JIT caches (only for cx->thread if JS_THREADSAFE). */ js_FlushPropertyCache(cx); +#ifdef JS_TRACER js_FlushJITCache(cx); +#endif #ifdef JS_THREADSAFE /* diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp index e9518f8b9d3..64e49586133 100644 --- a/js/src/jsinterp.cpp +++ b/js/src/jsinterp.cpp @@ -2660,6 +2660,7 @@ js_Interpret(JSContext *cx) * the compiler can keep it in a register when it is non-null. */ #if JS_THREADED_INTERP +#ifdef JS_TRACER # define LOAD_INTERRUPT_HANDLER(cx) \ ((void) (jumpTable = (cx)->debugHooks->interruptHandler \ ? interruptJumpTable \ @@ -2672,7 +2673,15 @@ js_Interpret(JSContext *cx) JS_ASSERT(flag_ == !!JS_TRACE_MONITOR(cx).recorder); \ jumpTable = flag_ ? recordingJumpTable : normalJumpTable; \ JS_END_MACRO -#else +#else /* !JS_TRACER */ +# define LOAD_INTERRUPT_HANDLER(cx) \ + ((void) (jumpTable = (cx)->debugHooks->interruptHandler \ + ? interruptJumpTable \ + : normalJumpTable)) +# define ENABLE_TRACER(flag) (void)0 +#endif /* !JS_TRACER */ +#else /* !JS_THREADED_INTERP */ +#ifdef JS_TRACER # define LOAD_INTERRUPT_HANDLER(cx) \ ((void) (switchMask = ((cx)->debugHooks->interruptHandler || \ JS_TRACE_MONITOR(cx).recorder) \ @@ -2683,7 +2692,13 @@ js_Interpret(JSContext *cx) JS_ASSERT(flag_ == !!JS_TRACE_MONITOR(cx).recorder); \ switchMask = flag_ ? 0 : 255; \ JS_END_MACRO -#endif +#else /* !JS_TRACER */ +# define LOAD_INTERRUPT_HANDLER(cx) \ + ((void) (switchMask = ((cx)->debugHooks->interruptHandler \ + ? 0 : 255))) +# define ENABLE_TRACER(flag) (void)0 +#endif /* !JS_TRACER */ +#endif /* !JS_THREADED_INTERP */ LOAD_INTERRUPT_HANDLER(cx);