[JAEGER] Fix building without --enable-methodjit.
authorSean Stangl <sstangl@mozilla.com>
Wed, 21 Jul 2010 17:25:04 -0700
changeset 53145 acc6d8f2fa9f45e11ae7b7f9bb9ed0a3a21d5af2
parent 53144 72a16f6ce26de24f9d8dc26c51bc9dcf957d69ae
child 53146 f580d3f9c163252166185e4059ee0f9fa2c294a1
push id15660
push userrsayre@mozilla.com
push dateSat, 11 Sep 2010 19:16:24 +0000
treeherdermozilla-central@f1bd314e64ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b2pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
[JAEGER] Fix building without --enable-methodjit.
js/src/jscntxt.h
js/src/jsinterp.cpp
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -221,16 +221,17 @@ struct TracerState
     // completes execution.
     JSFrameRegs    bailedSlowNativeRegs;
 
     TracerState(JSContext *cx, TraceMonitor *tm, TreeFragment *ti,
                 uintN &inlineCallCountp, VMSideExit** innermostNestedGuardp);
     ~TracerState();
 };
 
+#ifdef JS_METHODJIT
 namespace mjit {
     struct Trampolines
     {
         void (* forceReturn)();
         JSC::ExecutablePool *forceReturnPool;
     };
 
     struct ThreadData
@@ -249,16 +250,17 @@ namespace mjit {
         bool Initialize();
         void Finish();
 
         bool addScript(JSScript *script);
         void removeScript(JSScript *script);
         void purge(JSContext *cx);
     };
 }
+#endif /* JS_METHODJIT */
 
 /*
  * Storage for the execution state and store during trace execution. Generated
  * code depends on the fact that the globals begin |MAX_NATIVE_STACK_SLOTS|
  * doubles after the stack begins. Thus, on trace, |TracerState::eos| holds a
  * pointer to the first global.
  */
 struct TraceNativeStorage
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -2234,17 +2234,19 @@ Interpret(JSContext *cx, JSStackFrame *e
      * Initialize the index segment register used by LOAD_ATOM and
      * GET_FULL_INDEX macros below. As a register we use a pointer based on
      * the atom map to turn frequently executed LOAD_ATOM into simple array
      * access. For less frequent object and regexp loads we have to recover
      * the segment from atoms pointer first.
      */
     JSAtom **atoms = script->atomMap.vector;
 
+#ifdef JS_METHODJIT
     bool leaveOnTracePoint = (fp->flags & JSFRAME_BAILING) && !fp->imacpc;
+#endif
 
 #define LOAD_ATOM(PCOFF, atom)                                                \
     JS_BEGIN_MACRO                                                            \
         JS_ASSERT(fp->imacpc                                                  \
                   ? atoms == COMMON_ATOMS_START(&rt->atomState) &&            \
                     GET_INDEX(regs.pc + PCOFF) < js_common_atom_count         \
                   : (size_t)(atoms - script->atomMap.vector) <                \
                     (size_t)(script->atomMap.length -                         \
@@ -2326,24 +2328,28 @@ Interpret(JSContext *cx, JSStackFrame *e
         if (cx->interruptFlags && !js_HandleExecutionInterrupt(cx))           \
             goto error;                                                       \
     JS_END_MACRO
 
 #ifndef TRACE_RECORDER
 #define TRACE_RECORDER(cx) (false)
 #endif
 
-#define LEAVE_ON_TRACE_POINT()                                                \
+#ifdef JS_METHODJIT
+# define LEAVE_ON_TRACE_POINT()                                                \
     do {                                                                      \
         if (leaveOnTracePoint && !fp->imacpc &&                               \
             script->nmap && script->nmap[regs.pc - script->code]) {           \
             interpReturnOK = true;                                            \
             goto stop_recording;                                              \
         }                                                                     \
     } while (0)
+#else
+# define LEAVE_ON_TRACE_POINT() /* nop */
+#endif
 
 #define BRANCH(n)                                                             \
     JS_BEGIN_MACRO                                                            \
         regs.pc += (n);                                                       \
         op = (JSOp) *regs.pc;                                                 \
         if ((n) <= 0) {                                                       \
             CHECK_BRANCH();                                                   \
             if (op == JSOP_NOP) {                                             \
@@ -7138,17 +7144,19 @@ END_CASE(JSOP_ARRAYPUSH)
         const char *printable;
 
         printable = js_AtomToPrintableString(cx, atomNotDefined);
         if (printable)
             js_ReportIsNotDefined(cx, printable);
         goto error;
     }
 
+#ifdef JS_METHODJIT
   stop_recording:
+#endif
     JS_ASSERT(cx->regs == &regs);
     *prevContextRegs = regs;
     cx->setCurrentRegs(prevContextRegs);
     return interpReturnOK;
 }
 
 } /* namespace js */