Assert on the recording table only if we have enabled the tracer (446551).
Assert on the recording table only if we have enabled the tracer (446551).
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -2506,30 +2506,37 @@ js_Interpret(JSContext *cx)
# define OPDEF(op,val,name,token,length,nuses,ndefs,prec,format) \
JS_EXTENSION &&L_JSOP_INTERRUPT,
# include "jsopcode.tbl"
# undef OPDEF
};
METER_OP_INIT(op); /* to nullify first METER_OP_PAIR */
-# define DO_OP() JS_BEGIN_MACRO \
+# ifdef JS_TRACER
+# define CHECK_RECORDER() JS_BEGIN_MACRO \
JS_ASSERT(!JS_TRACE_MONITOR(cx).recorder || \
jumpTable == recordingJumpTable); \
+ JS_END_MACRO
+# else
+# define CHECK_RECORDER() ((void)0)
+# endif
+
+# define DO_OP() JS_BEGIN_MACRO \
+ CHECK_RECORDER(); \
JS_EXTENSION_(goto *jumpTable[op]); \
JS_END_MACRO
# define DO_NEXT_OP(n) JS_BEGIN_MACRO \
METER_OP_PAIR(op, regs.pc[n]); \
op = (JSOp) *(regs.pc += (n)); \
DO_OP(); \
JS_END_MACRO
# define BEGIN_CASE(OP) L_##OP: \
- JS_ASSERT(!JS_TRACE_MONITOR(cx).recorder || \
- jumpTable == recordingJumpTable);
+ CHECK_RECORDER();
# define END_CASE(OP) DO_NEXT_OP(OP##_LENGTH);
# define END_VARLEN_CASE DO_NEXT_OP(len);
# define ADD_EMPTY_CASE(OP) BEGIN_CASE(OP) \
JS_ASSERT(js_CodeSpec[OP].length == 1); \
op = (JSOp) *++regs.pc; \
DO_OP();
# define END_EMPTY_CASES