Assert on the recording table only if we have enabled the tracer (446551).
authorAndreas Gal <gal@mozilla.com>
Thu, 14 Aug 2008 09:04:22 -0700
changeset 18171 161cb76cb8f0e1d741ec1e0032ac46c4e7a220e6
parent 18170 f80f08b0d8fca4e4fbf70f2b1ce48227b9aeafb0
child 18172 8a48902b37536cfb441ee74c0dd5124d9d807eba
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs446551
milestone1.9.1a2pre
Assert on the recording table only if we have enabled the tracer (446551).
js/src/jsinterp.cpp
--- 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