No bug. Fix --disable-methodjit build breakage from 23936f566781 (bug 710032). r=woof!
authorSteve Fink <sfink@mozilla.com>
Thu, 29 Dec 2011 15:19:26 -0800
changeset 84776 e6835bba07af37b994ac3114b0300387e964d78c
parent 84775 7ec975506cd8c96542aa930d8830935d3829edd8
child 84777 91c63f6c1b1362f54d851428addf36e8a2c3b33f
push idunknown
push userunknown
push dateunknown
reviewerswoof
bugs710032
milestone12.0a1
No bug. Fix --disable-methodjit build breakage from 23936f566781 (bug 710032). r=woof!
js/src/jsprobes.cpp
js/src/jsprobes.h
--- a/js/src/jsprobes.cpp
+++ b/js/src/jsprobes.cpp
@@ -50,19 +50,17 @@
 #include "jsdbgapi.h"
 #include "jsfun.h"
 #include "jsinterp.h"
 #include "jsobj.h"
 #include "jsprobes.h"
 #include "jsscript.h"
 #include "jsstr.h"
 
-#ifdef JS_METHODJIT
-# include "methodjit/Compiler.h"
-#endif
+#include "methodjit/Compiler.h"
 
 #include "jsobjinlines.h"
 
 #define TYPEOF(cx,v)    (JSVAL_IS_NULL(v) ? JSTYPE_NULL : JS_TypeOfValue(cx,v))
 
 using namespace js;
 
 const char Probes::nullName[] = "(null)";
@@ -113,16 +111,17 @@ Probes::JITGranularityRequested()
         JITReportGranularity request = (*p)->granularityRequested();
         if (request > want)
             want = request;
     }
 
     return want;
 }
 
+#ifdef JS_METHODJIT
 /*
  * Flatten the tree of inlined frames into a series of native code regions, one
  * for each contiguous section of native code that belongs to a single
  * ActiveFrame. (Note that some of these regions may be zero-length, for
  * example if two ActiveFrames end at the same place.)
  */
 typedef mjit::Compiler::ActiveFrame ActiveFrame;
 
@@ -212,17 +211,16 @@ Probes::JITWatcher::CollectNativeRegions
 
     // All of the stub code comes immediately after the main code
     for (NativeRegion *iter = regions.begin(); iter != regions.end(); ++iter)
         iter->stubOffset += outerFrame->mainCodeEnd;
 
     return true;
 }
 
-#ifdef JS_METHODJIT
 void
 Probes::registerMJITCode(JSContext *cx, js::mjit::JITScript *jscr,
                          js::mjit::JSActiveFrame *outerFrame,
                          js::mjit::JSActiveFrame **inlineFrames,
                          void *mainCodeAddress, size_t mainCodeSize,
                          void *stubCodeAddress, size_t stubCodeSize)
 {
     for (JITWatcher **p = jitWatchers.begin(); p != jitWatchers.end(); ++p)
--- a/js/src/jsprobes.h
+++ b/js/src/jsprobes.h
@@ -238,25 +238,25 @@ public:
         jsbytecode *endpc;
         uintptr_t mainOffset;
         uintptr_t stubOffset;
         bool enter;
     };
 
     typedef Vector<NativeRegion, 0, RuntimeAllocPolicy> RegionVector;
 
+    virtual JITReportGranularity granularityRequested() = 0;
+
+#ifdef JS_METHODJIT
     static bool CollectNativeRegions(RegionVector &regions,
                                      JSRuntime *rt,
                                      mjit::JITScript *jit,
                                      mjit::JSActiveFrame *outerFrame,
                                      mjit::JSActiveFrame **inlineFrames);
 
-    virtual JITReportGranularity granularityRequested() = 0;
-
-#ifdef JS_METHODJIT
     virtual void registerMJITCode(JSContext *cx, js::mjit::JITScript *jscr,
                                   mjit::JSActiveFrame *outerFrame,
                                   mjit::JSActiveFrame **inlineFrames,
                                   void *mainCodeAddress, size_t mainCodeSize,
                                   void *stubCodeAddress, size_t stubCodeSize) = 0;
 
     virtual void discardMJITCode(JSContext *cx, mjit::JITScript *jscr, JSScript *script,
                                  void* address) = 0;