rename ENABLE_TRACER to TRACING_ENABLED and explicitly parameterize on cx

This commit is contained in:
shaver@mozilla.org 2008-06-27 11:41:59 -04:00
parent 0c5757a21f
commit af19dd5627
2 changed files with 3 additions and 3 deletions

View File

@ -2924,7 +2924,7 @@ JS_INTERPRET(JSContext *cx, JSInterpreterState *state)
#ifndef jstracer_cpp___
# define MONITOR_BRANCH(n) \
JS_BEGIN_MACRO \
if (ENABLE_TRACER && \
if (TRACING_ENABLED(cx) && \
(JS_TRACE_MONITOR(cx).freq++ & TRACE_TRIGGER_MASK) == 0) { \
regs.pc += n; \
goto attempt_recording; \
@ -2933,7 +2933,7 @@ JS_INTERPRET(JSContext *cx, JSInterpreterState *state)
#else
# define MONITOR_BRANCH(n) \
JS_BEGIN_MACRO \
if (ENABLE_TRACER && \
if (TRACING_ENABLED(cx) && \
JS_TRACE_MONITOR(cx).recorder != NULL && \
JS_TRACE_MONITOR(cx).recorder->entryState.pc == (regs.pc + n)) { \
goto end_recording; \

View File

@ -139,7 +139,7 @@ struct JSTraceMonitor {
TraceRecorder* recorder;
};
#define ENABLE_TRACER JS_HAS_OPTION(cx, JSOPTION_JIT)
#define TRACING_ENABLED(cx) JS_HAS_OPTION(cx, JSOPTION_JIT)
#define TRACE_TRIGGER_MASK 0x3f
extern bool