Backed out changeset fdd10e0e6e5e (bug 739512) due to 32-bit bustage.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 10 Apr 2012 18:36:08 -0700
changeset 91369 0feac51b6605bd9ddcfd44704877c1f6ccf9f26e
parent 91368 fdd10e0e6e5e4733dc76535020d5482de6e0134e
child 91370 9187a8ec50038722f9fdd88b8982b55a5bc52648
push id8182
push usernnethercote@mozilla.com
push dateWed, 11 Apr 2012 01:36:35 +0000
treeherdermozilla-inbound@0feac51b6605 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs739512
milestone14.0a1
backs outfdd10e0e6e5e4733dc76535020d5482de6e0134e
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
Backed out changeset fdd10e0e6e5e (bug 739512) due to 32-bit bustage.
js/src/jscompartment.cpp
js/src/jscompartment.h
js/src/jsdbgapi.cpp
js/src/jsgc.cpp
js/src/jsinterp.cpp
js/src/jsopcode.cpp
js/src/jsscript.cpp
js/src/jsscript.h
js/src/methodjit/BaseAssembler.h
js/src/methodjit/Compiler.cpp
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -86,18 +86,17 @@ JSCompartment::JSCompartment(JSRuntime *
     regExps(rt),
     propertyTree(thisForCtor()),
     emptyTypeObject(NULL),
     gcMallocAndFreeBytes(0),
     gcTriggerMallocAndFreeBytes(0),
     gcMallocBytes(0),
     debugModeBits(rt->debugMode ? DebugFromC : 0),
     mathCache(NULL),
-    watchpointMap(NULL),
-    scriptCountsMap(NULL)
+    watchpointMap(NULL)
 {
     PodArrayZero(evalCache);
     setGCMaxMallocBytes(rt->gcMaxMallocBytes * 0.9);
 }
 
 JSCompartment::~JSCompartment()
 {
     /*
@@ -107,17 +106,16 @@ JSCompartment::~JSCompartment()
     FreeScriptFilenames(this);
 
 #ifdef JS_METHODJIT
     Foreground::delete_(jaegerCompartment_);
 #endif
 
     Foreground::delete_(mathCache);
     Foreground::delete_(watchpointMap);
-    Foreground::delete_(scriptCountsMap);
 
 #ifdef DEBUG
     for (size_t i = 0; i < ArrayLength(evalCache); ++i)
         JS_ASSERT(!evalCache[i]);
 #endif
 }
 
 bool
--- a/js/src/jscompartment.h
+++ b/js/src/jscompartment.h
@@ -458,18 +458,16 @@ struct JSCompartment
     void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JSObject *handler);
     void clearTraps(js::FreeOp *fop);
 
   private:
     void sweepBreakpoints(js::FreeOp *fop);
 
   public:
     js::WatchpointMap *watchpointMap;
-
-    js::ScriptCountsMap *scriptCountsMap;
 };
 
 #define JS_PROPERTY_TREE(cx)    ((cx)->compartment->propertyTree)
 
 namespace js {
 static inline MathCache *
 GetMathCache(JSContext *cx)
 {
--- a/js/src/jsdbgapi.cpp
+++ b/js/src/jsdbgapi.cpp
@@ -1593,17 +1593,17 @@ JS_DumpBytecode(JSContext *cx, JSScript 
     fprintf(stdout, "--- END SCRIPT %s:%d ---\n", script->filename, script->lineno);
 #endif
 }
 
 extern JS_PUBLIC_API(void)
 JS_DumpPCCounts(JSContext *cx, JSScript *script)
 {
 #if defined(DEBUG)
-    JS_ASSERT(script->hasScriptCounts);
+    JS_ASSERT(script->scriptCounts);
 
     Sprinter sprinter(cx);
     if (!sprinter.init())
         return;
 
     fprintf(stdout, "--- SCRIPT %s:%d ---\n", script->filename, script->lineno);
     js_DumpPCCounts(cx, script, &sprinter);
     fputs(sprinter.string(), stdout);
@@ -1636,17 +1636,17 @@ JS_DumpCompartmentBytecode(JSContext *cx
         JS_DumpBytecode(cx, scripts[i]);
 }
 
 JS_PUBLIC_API(void)
 JS_DumpCompartmentPCCounts(JSContext *cx)
 {
     for (CellIter i(cx->compartment, gc::FINALIZE_SCRIPT); !i.done(); i.next()) {
         JSScript *script = i.get<JSScript>();
-        if (script->hasScriptCounts)
+        if (script->scriptCounts)
             JS_DumpPCCounts(cx, script);
     }
 }
 
 JS_PUBLIC_API(JSObject *)
 JS_UnwrapObject(JSObject *obj)
 {
     return UnwrapObject(obj);
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -2301,17 +2301,17 @@ MarkRuntime(JSTracer *trc, bool useSaved
             if (c->watchpointMap)
                 c->watchpointMap->markAll(trc);
         }
 
         /* Do not discard scripts with counts while profiling. */
         if (rt->profilingScripts) {
             for (CellIterUnderGC i(c, FINALIZE_SCRIPT); !i.done(); i.next()) {
                 JSScript *script = i.get<JSScript>();
-                if (script->hasScriptCounts) {
+                if (script->scriptCounts) {
                     MarkScriptRoot(trc, &script, "profilingScripts");
                     JS_ASSERT(script == i.get<JSScript>());
                 }
             }
         }
     }
 
 #ifdef JS_METHODJIT
@@ -4492,22 +4492,22 @@ StopPCCountProfiling(JSContext *cx)
 
     ScriptAndCountsVector *vec = cx->new_<ScriptAndCountsVector>(SystemAllocPolicy());
     if (!vec)
         return;
 
     for (GCCompartmentsIter c(rt); !c.done(); c.next()) {
         for (CellIter i(c, FINALIZE_SCRIPT); !i.done(); i.next()) {
             JSScript *script = i.get<JSScript>();
-            if (script->hasScriptCounts && script->types) {
-                ScriptAndCounts sac;
-                sac.script = script;
-                sac.scriptCounts.set(script->releaseScriptCounts());
-                if (!vec->append(sac))
-                    sac.scriptCounts.destroy(rt->defaultFreeOp());
+            if (script->scriptCounts && script->types) {
+                ScriptAndCounts info;
+                info.script = script;
+                info.scriptCounts.steal(script->scriptCounts);
+                if (!vec->append(info))
+                    info.scriptCounts.destroy(rt->defaultFreeOp());
             }
         }
     }
 
     rt->profilingScripts = false;
     rt->scriptAndCountsVector = vec;
 }
 
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -1335,19 +1335,19 @@ js::Interpret(JSContext *cx, StackFrame 
 {
     JSAutoResolveFlags rf(cx, RESOLVE_INFER);
 
     gc::MaybeVerifyBarriers(cx, true);
 
     JS_ASSERT(!cx->compartment->activeAnalysis);
 
 #if JS_THREADED_INTERP
-#define CHECK_PCCOUNT_INTERRUPTS() JS_ASSERT_IF(script->hasScriptCounts, jumpTable == interruptJumpTable)
+#define CHECK_PCCOUNT_INTERRUPTS() JS_ASSERT_IF(script->scriptCounts, jumpTable == interruptJumpTable)
 #else
-#define CHECK_PCCOUNT_INTERRUPTS() JS_ASSERT_IF(script->hasScriptCounts, switchMask == -1)
+#define CHECK_PCCOUNT_INTERRUPTS() JS_ASSERT_IF(script->scriptCounts, switchMask == -1)
 #endif
 
     /*
      * Macros for threaded interpreter loop
      */
 #if JS_THREADED_INTERP
     static void *const normalJumpTable[] = {
 # define OPDEF(op,val,name,token,length,nuses,ndefs,prec,format) \
@@ -1515,17 +1515,17 @@ js::Interpret(JSContext *cx, StackFrame 
         DO_OP();                                                              \
     JS_END_MACRO
 
 #define SET_SCRIPT(s)                                                         \
     JS_BEGIN_MACRO                                                            \
         script = (s);                                                         \
         if (script->hasAnyBreakpointsOrStepMode())                            \
             ENABLE_INTERRUPTS();                                              \
-        if (script->hasScriptCounts)                                          \
+        if (script->scriptCounts)                                             \
             ENABLE_INTERRUPTS();                                              \
         JS_ASSERT_IF(interpMode == JSINTERP_SKIP_TRAP,                        \
                      script->hasAnyBreakpointsOrStepMode());                  \
     JS_END_MACRO
 
 #define CHECK_INTERRUPT_HANDLER()                                             \
     JS_BEGIN_MACRO                                                            \
         if (cx->runtime->debugHooks.interruptHook)                            \
@@ -1656,22 +1656,22 @@ js::Interpret(JSContext *cx, StackFrame 
 #else /* !JS_THREADED_INTERP */
   case -1:
     JS_ASSERT(switchMask == -1);
 #endif /* !JS_THREADED_INTERP */
     {
         bool moreInterrupts = false;
 
         if (cx->runtime->profilingScripts) {
-            if (!script->hasScriptCounts)
+            if (!script->scriptCounts)
                 script->initScriptCounts(cx);
             moreInterrupts = true;
         }
 
-        if (script->hasScriptCounts) {
+        if (script->scriptCounts) {
             PCCounts counts = script->getPCCounts(regs.pc);
             counts.get(PCCounts::BASE_INTERP)++;
             moreInterrupts = true;
         }
 
         JSInterruptHook hook = cx->runtime->debugHooks.interruptHook;
         if (hook || script->stepModeEnabled()) {
             Value rval;
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -310,17 +310,17 @@ PCCounts::countName(JSOp op, size_t whic
     return NULL;
 }
 
 #ifdef DEBUG
 
 JS_FRIEND_API(void)
 js_DumpPCCounts(JSContext *cx, JSScript *script, js::Sprinter *sp)
 {
-    JS_ASSERT(script->hasScriptCounts);
+    JS_ASSERT(script->scriptCounts);
 
     jsbytecode *pc = script->code;
     while (pc < script->code + script->length) {
         JSOp op = JSOp(*pc);
 
         int len = js_CodeSpec[op].length;
         jsbytecode *next = (len != -1) ? pc + len : pc + js_GetVariableBytecodeLength(pc);
 
@@ -6051,18 +6051,18 @@ GetPCCountScriptSummary(JSContext *cx, s
 {
     JSRuntime *rt = cx->runtime;
 
     if (!rt->scriptAndCountsVector || index >= rt->scriptAndCountsVector->length()) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BUFFER_TOO_SMALL);
         return NULL;
     }
 
-    ScriptAndCounts sac = (*rt->scriptAndCountsVector)[index];
-    JSScript *script = sac.script;
+    ScriptAndCounts info = (*rt->scriptAndCountsVector)[index];
+    JSScript *script = info.script;
 
     /*
      * OOM on buffer appends here will not be caught immediately, but since
      * StringBuffer uses a ContextAllocPolicy will trigger an exception on the
      * context if they occur, which we'll catch before returning.
      */
     StringBuffer buf(cx);
 
@@ -6089,17 +6089,17 @@ GetPCCountScriptSummary(JSContext *cx, s
 
     double baseTotals[PCCounts::BASE_LIMIT] = {0.0};
     double accessTotals[PCCounts::ACCESS_LIMIT - PCCounts::BASE_LIMIT] = {0.0};
     double elementTotals[PCCounts::ELEM_LIMIT - PCCounts::ACCESS_LIMIT] = {0.0};
     double propertyTotals[PCCounts::PROP_LIMIT - PCCounts::ACCESS_LIMIT] = {0.0};
     double arithTotals[PCCounts::ARITH_LIMIT - PCCounts::BASE_LIMIT] = {0.0};
 
     for (unsigned i = 0; i < script->length; i++) {
-        PCCounts &counts = sac.getPCCounts(script->code + i);
+        PCCounts &counts = info.getPCCounts(script->code + i);
         if (!counts)
             continue;
 
         JSOp op = (JSOp)script->code[i];
         unsigned numCounts = PCCounts::numCounts(op);
 
         for (unsigned j = 0; j < numCounts; j++) {
             double value = counts.get(j);
@@ -6150,19 +6150,19 @@ GetPCCountScriptSummary(JSContext *cx, s
 struct AutoDestroyPrinter
 {
     JSPrinter *jp;
     AutoDestroyPrinter(JSPrinter *jp) : jp(jp) {}
     ~AutoDestroyPrinter() { js_DestroyPrinter(jp); }
 };
 
 static bool
-GetPCCountJSON(JSContext *cx, const ScriptAndCounts &sac, StringBuffer &buf)
+GetPCCountJSON(JSContext *cx, const ScriptAndCounts &info, StringBuffer &buf)
 {
-    JSScript *script = sac.script;
+    JSScript *script = info.script;
 
     buf.append('{');
     AppendJSONProperty(buf, "text", NO_COMMA);
 
     Vector<DecompiledOpcode> decompiledOpcodes(cx);
     if (!decompiledOpcodes.reserve(script->length))
         return false;
 
@@ -6248,17 +6248,17 @@ GetPCCountJSON(JSContext *cx, const Scri
         if (text && *text != 0) {
             AppendJSONProperty(buf, "text");
             JSString *str = JS_NewStringCopyZ(cx, text);
             if (!str || !(str = JS_ValueToSource(cx, StringValue(str))))
                 return false;
             buf.append(str);
         }
 
-        PCCounts &counts = sac.getPCCounts(pc);
+        PCCounts &counts = info.getPCCounts(pc);
         unsigned numCounts = PCCounts::numCounts(op);
 
         AppendJSONProperty(buf, "counts");
         buf.append('{');
 
         MaybeComma comma = NO_COMMA;
         for (unsigned i = 0; i < numCounts; i++) {
             double value = counts.get(i);
@@ -6284,29 +6284,29 @@ GetPCCountScriptContents(JSContext *cx, 
 {
     JSRuntime *rt = cx->runtime;
 
     if (!rt->scriptAndCountsVector || index >= rt->scriptAndCountsVector->length()) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BUFFER_TOO_SMALL);
         return NULL;
     }
 
-    const ScriptAndCounts &sac = (*rt->scriptAndCountsVector)[index];
-    JSScript *script = sac.script;
+    const ScriptAndCounts &info = (*rt->scriptAndCountsVector)[index];
+    JSScript *script = info.script;
 
     StringBuffer buf(cx);
 
     if (!script->function() && !script->compileAndGo)
         return buf.finishString();
 
     {
         JSAutoEnterCompartment ac;
         if (!ac.enter(cx, script->function() ? (JSObject *) script->function() : script->global()))
             return NULL;
 
-        if (!GetPCCountJSON(cx, sac, buf))
+        if (!GetPCCountJSON(cx, info, buf))
             return NULL;
     }
 
     return buf.finishString();
 }
 
 } // namespace js
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -781,107 +781,62 @@ template bool
 js::XDRScript(XDRState<XDR_ENCODE> *xdr, JSScript **scriptp, JSScript *parentScript);
 
 template bool
 js::XDRScript(XDRState<XDR_DECODE> *xdr, JSScript **scriptp, JSScript *parentScript);
 
 bool
 JSScript::initScriptCounts(JSContext *cx)
 {
-    JS_ASSERT(!hasScriptCounts);
+    JS_ASSERT(!scriptCounts);
 
     size_t n = 0;
 
     jsbytecode *pc, *next;
     for (pc = code; pc < code + length; pc = next) {
         n += PCCounts::numCounts(JSOp(*pc));
         next = pc + GetBytecodeLength(pc);
     }
 
     size_t bytes = (length * sizeof(PCCounts)) + (n * sizeof(double));
     char *cursor = (char *) cx->calloc_(bytes);
     if (!cursor)
         return false;
 
-    /* Create compartment's scriptCountsMap if necessary. */
-    ScriptCountsMap *map = compartment()->scriptCountsMap;
-    if (!map) {
-        map = cx->new_<ScriptCountsMap>();
-        if (!map || !map->init()) {
-            cx->free_(cursor);
-            cx->delete_(map);
-            return false;
-        }
-        compartment()->scriptCountsMap = map;
-    }
-
     DebugOnly<char *> base = cursor;
 
-    ScriptCounts scriptCounts;
     scriptCounts.pcCountsVector = (PCCounts *) cursor;
     cursor += length * sizeof(PCCounts);
 
     for (pc = code; pc < code + length; pc = next) {
         scriptCounts.pcCountsVector[pc - code].counts = (double *) cursor;
         size_t capacity = PCCounts::numCounts(JSOp(*pc));
 #ifdef DEBUG
         scriptCounts.pcCountsVector[pc - code].capacity = capacity;
 #endif
         cursor += capacity * sizeof(double);
         next = pc + GetBytecodeLength(pc);
     }
 
-    if (!map->putNew(this, scriptCounts)) {
-        cx->free_(cursor);
-        cx->delete_(map);
-        return false;
-    }
-    hasScriptCounts = true; // safe to set this;  we can't fail after this point
-
     JS_ASSERT(size_t(cursor - base) == bytes);
 
     /* Enable interrupts in any interpreter frames running on this script. */
     InterpreterFrames *frames;
     for (frames = cx->runtime->interpreterFrames; frames; frames = frames->older)
         frames->enableInterruptsIfRunning(this);
 
     return true;
 }
 
-js::PCCounts
-JSScript::getPCCounts(jsbytecode *pc) {
-    JS_ASSERT(hasScriptCounts);
-    JS_ASSERT(size_t(pc - code) < length);
-    ScriptCountsMap *map = compartment()->scriptCountsMap;
-    JS_ASSERT(map);
-    ScriptCountsMap::Ptr p = map->lookup(this);
-    JS_ASSERT(p);
-    return p->value.pcCountsVector[pc - code];
-}
-
-ScriptCounts
-JSScript::releaseScriptCounts()
-{
-    JS_ASSERT(hasScriptCounts);
-    ScriptCountsMap *map = compartment()->scriptCountsMap;
-    JS_ASSERT(map);
-    ScriptCountsMap::Ptr p = map->lookup(this);
-    JS_ASSERT(p);
-    ScriptCounts counts = p->value;
-    map->remove(p);
-    hasScriptCounts = false;
-    return counts;
-}
-
 void
 JSScript::destroyScriptCounts(FreeOp *fop)
 {
-    if (hasScriptCounts) {
-        ScriptCounts scriptCounts = releaseScriptCounts();
+    if (scriptCounts) {
         fop->free_(scriptCounts.pcCountsVector);
+        scriptCounts.pcCountsVector = NULL;
     }
 }
 
 /*
  * Shared script filename management.
  */
 
 const char *
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -300,30 +300,33 @@ class ScriptCounts
     /*
      * This points to a single block that holds an array of PCCounts followed
      * by an array of doubles.  Each element in the PCCounts array has a
      * pointer into the array of doubles.
      */
     PCCounts *pcCountsVector;
 
  public:
-    ScriptCounts() : pcCountsVector(NULL) { }
+
+    ScriptCounts() : pcCountsVector(NULL) {
+    }
 
     inline void destroy(FreeOp *fop);
 
-    void set(js::ScriptCounts counts) {
-        pcCountsVector = counts.pcCountsVector;
+    void steal(ScriptCounts &other) {
+        *this = other;
+        js::PodZero(&other);
+    }
+
+    // Boolean conversion, for 'if (scriptCounts) ...'
+    operator void*() const {
+        return pcCountsVector;
     }
 };
 
-typedef HashMap<JSScript *,
-                ScriptCounts,
-                DefaultHasher<JSScript *>,
-                SystemAllocPolicy> ScriptCountsMap;
-
 class DebugScript
 {
     friend struct ::JSScript;
 
     /*
      * When non-zero, compile script in single-step mode. The top bit is set and
      * cleared by setStepMode, as used by JSD. The lower bits are a count,
      * adjusted by changeStepModeCount, used by the Debugger object. Only
@@ -431,53 +434,54 @@ struct JSScript : public js::gc::Cell
      *   compile-and-go script.
      * - Temporary scripts created by obj_eval, JS_EvaluateScript, and
      *   similar functions never have the globalObject field set; for such
      *   scripts the global should be extracted from the JS frame that
      *   execute scripts.
      */
     js::HeapPtr<js::GlobalObject, JSScript*> globalObject;
 
+    /* Execution and profiling information for JIT code in the script. */
+    js::ScriptCounts scriptCounts;
+
     /* Persistent type information retained across GCs. */
     js::types::TypeScript *types;
 
   public:
 #ifdef JS_METHODJIT
     JITScriptHandle jitHandleNormal; // extra JIT info for normal scripts
     JITScriptHandle jitHandleCtor;   // extra JIT info for constructors
 #endif
 
   private:
     js::DebugScript     *debug;
     js::HeapPtrFunction function_;
 
     size_t          useCount;   /* Number of times the script has been called
                                  * or has had backedges taken. Reset if the
                                  * script's JIT code is forcibly discarded. */
-
     // 32-bit fields.
 
   public:
     uint32_t        length;     /* length of code vector */
 
     uint32_t        lineno;     /* base line number of script */
 
     uint32_t        mainOffset; /* offset of main entry point from code, after
                                    predef'ing prolog */
 
     uint32_t        natoms;     /* length of atoms array */
 
 #ifdef DEBUG
     // Unique identifier within the compartment for this script, used for
     // printing analysis information.
     uint32_t        id_;
- #if JS_BITS_PER_WORD == 64
   private:
-    uint32_t        idpad64;
- #endif
+    uint32_t        idpad;
+  public:
 #endif
 
     // 16-bit fields.
 
   private:
     uint16_t        version;    /* JS version under which script was compiled */
 
   public:
@@ -534,18 +538,16 @@ struct JSScript : public js::gc::Cell
     bool            reentrantOuterFunction:1; /* outer function marked reentrant */
     bool            typesPurged:1;    /* TypeScript has been purged at some point */
 #ifdef JS_METHODJIT
     bool            debugMode:1;      /* script was compiled in debug mode */
     bool            failedBoundsCheck:1; /* script has had hoisted bounds checks fail */
 #endif
     bool            callDestroyHook:1;/* need to call destroy hook */
     bool            isGenerator:1;    /* is a generator */
-    bool            hasScriptCounts:1;/* script has an entry in
-                                         JSCompartment::scriptCountsMap */
 
   private:
     /* See comments below. */
     bool            argsHasLocalBinding_:1;
     bool            needsArgsAnalysis_:1;
     bool            needsArgsObj_:1;
 
     //
@@ -687,20 +689,22 @@ struct JSScript : public js::gc::Cell
      * Size of the JITScript and all sections.  If |mallocSizeOf| is NULL, the
      * size is computed analytically.  (This method is implemented in
      * MethodJIT.cpp.)
      */
     size_t sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf);
 #endif
 
   public:
-    js::PCCounts getPCCounts(jsbytecode *pc);
+    js::PCCounts getPCCounts(jsbytecode *pc) {
+        JS_ASSERT(size_t(pc - code) < length);
+        return scriptCounts.pcCountsVector[pc - code];
+    }
 
     bool initScriptCounts(JSContext *cx);
-    js::ScriptCounts releaseScriptCounts();
     void destroyScriptCounts(js::FreeOp *fop);
 
     jsbytecode *main() {
         return code + mainOffset;
     }
 
     /*
      * computedSizeOfData() is the in-use size of all the data sections.
--- a/js/src/methodjit/BaseAssembler.h
+++ b/js/src/methodjit/BaseAssembler.h
@@ -1379,17 +1379,17 @@ static const JSC::MacroAssembler::Regist
     void bumpCount(double *count, RegisterID scratch)
     {
         addCount(&oneDouble, count, scratch);
     }
 
     /* Bump the stub call count for script/pc if they are being counted. */
     void bumpStubCount(JSScript *script, jsbytecode *pc, RegisterID scratch)
     {
-        if (script->hasScriptCounts) {
+        if (script->scriptCounts) {
             PCCounts counts = script->getPCCounts(pc);
             double *count = &counts.get(PCCounts::BASE_METHODJIT_STUBS);
             bumpCount(count, scratch);
         }
     }
 
     static const double oneDouble;
 };
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -397,17 +397,17 @@ mjit::Compiler::scanInlineCalls(uint32_t
     }
 
     return Compile_Okay;
 }
 
 CompileStatus
 mjit::Compiler::pushActiveFrame(JSScript *script, uint32_t argc)
 {
-    if (cx->runtime->profilingScripts && !script->hasScriptCounts)
+    if (cx->runtime->profilingScripts && !script->scriptCounts)
         script->initScriptCounts(cx);
 
     ActiveFrame *newa = OffTheBooks::new_<ActiveFrame>(cx);
     if (!newa) {
         js_ReportOutOfMemory(cx);
         return Compile_Error;
     }
 
@@ -531,17 +531,17 @@ mjit::Compiler::performCompilation()
     {
         types::AutoEnterCompilation enter(cx, outerScript, isConstructing, chunkIndex);
 
         CHECK_STATUS(checkAnalysis(outerScript));
         if (inlining())
             CHECK_STATUS(scanInlineCalls(CrossScriptSSA::OUTER_FRAME, 0));
         CHECK_STATUS(pushActiveFrame(outerScript, 0));
 
-        if (outerScript->hasScriptCounts || Probes::wantNativeAddressInfo(cx)) {
+        if (outerScript->scriptCounts || Probes::wantNativeAddressInfo(cx)) {
             size_t length = ssa.frameLength(ssa.numFrames() - 1);
             pcLengths = (PCLengthEntry *) OffTheBooks::calloc_(sizeof(pcLengths[0]) * length);
             if (!pcLengths)
                 return Compile_Error;
         }
 
         if (chunkIndex == 0)
             CHECK_STATUS(generatePrologue());
@@ -2111,17 +2111,17 @@ mjit::Compiler::generateMethod()
         }
 
         Label codeStart = masm.label();
         bool countsUpdated = false;
         bool arithUpdated = false;
 
         JSValueType arithFirstUseType = JSVAL_TYPE_UNKNOWN;
         JSValueType arithSecondUseType = JSVAL_TYPE_UNKNOWN;
-        if (script->hasScriptCounts && !!(js_CodeSpec[op].format & JOF_ARITH)) {
+        if (script->scriptCounts && !!(js_CodeSpec[op].format & JOF_ARITH)) {
             if (GetUseCount(script, PC - script->code) == 1) {
                 FrameEntry *use = frame.peek(-1);
                 /*
                  * Pretend it's a binary operation and the second operand has
                  * the same type as the first one.
                  */
                 if (use->isTypeKnown())
                     arithFirstUseType = arithSecondUseType = use->getKnownType();
@@ -2135,17 +2135,17 @@ mjit::Compiler::generateMethod()
             }
         }
 
         /*
          * Update PC counts for jump opcodes at their start, so that we don't
          * miss them when taking the jump. This is delayed for other opcodes,
          * as we want to skip updating for ops we didn't generate any code for.
          */
-        if (script->hasScriptCounts && JOF_OPTYPE(op) == JOF_JUMP)
+        if (script->scriptCounts && JOF_OPTYPE(op) == JOF_JUMP)
             updatePCCounts(PC, &codeStart, &countsUpdated);
 
     /**********************
      * BEGIN COMPILER OPS *
      **********************/
 
         lastPC = PC;
 
@@ -2171,17 +2171,17 @@ mjit::Compiler::generateMethod()
 
             FrameEntry *fe = frame.peek(-1);
             frame.storeTo(fe, Address(JSFrameReg, StackFrame::offsetOfReturnValue()), true);
             frame.pop();
           }
           END_CASE(JSOP_POPV)
 
           BEGIN_CASE(JSOP_RETURN)
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 updatePCCounts(PC, &codeStart, &countsUpdated);
             emitReturn(frame.peek(-1));
             fallthrough = false;
           END_CASE(JSOP_RETURN)
 
           BEGIN_CASE(JSOP_GOTO)
           BEGIN_CASE(JSOP_DEFAULT)
           {
@@ -2292,31 +2292,31 @@ mjit::Compiler::generateMethod()
 
           BEGIN_CASE(JSOP_LT)
           BEGIN_CASE(JSOP_LE)
           BEGIN_CASE(JSOP_GT)
           BEGIN_CASE(JSOP_GE)
           BEGIN_CASE(JSOP_EQ)
           BEGIN_CASE(JSOP_NE)
           {
-           if (script->hasScriptCounts) {
+           if (script->scriptCounts) {
                updateArithCounts(PC, NULL, arithFirstUseType, arithSecondUseType);
                arithUpdated = true;
            }
 
             /* Detect fusions. */
             jsbytecode *next = &PC[JSOP_GE_LENGTH];
             JSOp fused = JSOp(*next);
             if ((fused != JSOP_IFEQ && fused != JSOP_IFNE) || analysis->jumpTarget(next))
                 fused = JSOP_NOP;
 
             /* Get jump target, if any. */
             jsbytecode *target = NULL;
             if (fused != JSOP_NOP) {
-                if (script->hasScriptCounts)
+                if (script->scriptCounts)
                     updatePCCounts(PC, &codeStart, &countsUpdated);
                 target = next + GET_JUMP_OFFSET(next);
                 fixDoubleTypes(target);
             }
 
             BoolStub stub = NULL;
             switch (op) {
               case JSOP_LT:
@@ -2529,29 +2529,29 @@ mjit::Compiler::generateMethod()
           BEGIN_CASE(JSOP_CALLPROP)
           BEGIN_CASE(JSOP_LENGTH)
             if (!jsop_getprop(script->getName(GET_UINT32_INDEX(PC)), knownPushedType(0)))
                 return Compile_Error;
           END_CASE(JSOP_GETPROP)
 
           BEGIN_CASE(JSOP_GETELEM)
           BEGIN_CASE(JSOP_CALLELEM)
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 updateElemCounts(PC, frame.peek(-2), frame.peek(-1));
             if (!jsop_getelem())
                 return Compile_Error;
           END_CASE(JSOP_GETELEM)
 
           BEGIN_CASE(JSOP_TOID)
             jsop_toid();
           END_CASE(JSOP_TOID)
 
           BEGIN_CASE(JSOP_SETELEM)
           {
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 updateElemCounts(PC, frame.peek(-3), frame.peek(-2));
             jsbytecode *next = &PC[JSOP_SETELEM_LENGTH];
             bool pop = (JSOp(*next) == JSOP_POP && !analysis->jumpTarget(next));
             if (!jsop_setelem(pop))
                 return Compile_Error;
           }
           END_CASE(JSOP_SETELEM);
 
@@ -2579,17 +2579,17 @@ mjit::Compiler::generateMethod()
                     return status;
             }
             if (!done && inlining()) {
                 CompileStatus status = inlineScriptedFunction(GET_ARGC(PC), callingNew);
                 if (status == Compile_Okay)
                     done = true;
                 else if (status != Compile_InlineAbort)
                     return status;
-                if (script->hasScriptCounts) {
+                if (script->scriptCounts) {
                     /* Code generated while inlining has been accounted for. */
                     updatePCCounts(PC, &codeStart, &countsUpdated);
                 }
             }
 
             FrameSize frameSize;
             frameSize.initStatic(frame.totalDepth(), GET_ARGC(PC));
 
@@ -2668,17 +2668,17 @@ mjit::Compiler::generateMethod()
           BEGIN_CASE(JSOP_TABLESWITCH)
             /*
              * Note: there is no need to syncForBranch for the various targets of
              * switch statement. The liveness analysis has already marked these as
              * allocated with no registers in use. There is also no need to fix
              * double types, as we don't track types of slots in scripts with
              * switch statements (could be fixed).
              */
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 updatePCCounts(PC, &codeStart, &countsUpdated);
 #if defined JS_CPU_ARM /* Need to implement jump(BaseIndex) for ARM */
             frame.syncAndKillEverything();
             masm.move(ImmPtr(PC), Registers::ArgReg1);
 
             /* prepareStubCall() is not needed due to syncAndForgetEverything() */
             INLINE_STUBCALL(stubs::TableSwitch, REJOIN_NONE);
             frame.pop();
@@ -2688,17 +2688,17 @@ mjit::Compiler::generateMethod()
             if (!jsop_tableswitch(PC))
                 return Compile_Error;
 #endif
             PC += js_GetVariableBytecodeLength(PC);
             break;
           END_CASE(JSOP_TABLESWITCH)
 
           BEGIN_CASE(JSOP_LOOKUPSWITCH)
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 updatePCCounts(PC, &codeStart, &countsUpdated);
             frame.syncAndForgetEverything();
             masm.move(ImmPtr(PC), Registers::ArgReg1);
 
             /* prepareStubCall() is not needed due to syncAndForgetEverything() */
             INLINE_STUBCALL(stubs::LookupSwitch, REJOIN_NONE);
             frame.pop();
 
@@ -2717,32 +2717,32 @@ mjit::Compiler::generateMethod()
             // X cond
 
             if (!jsop_ifneq(JSOP_IFNE, PC + GET_JUMP_OFFSET(PC)))
                 return Compile_Error;
           END_CASE(JSOP_CASE)
 
           BEGIN_CASE(JSOP_STRICTEQ)
           BEGIN_CASE(JSOP_STRICTNE)
-            if (script->hasScriptCounts) {
+            if (script->scriptCounts) {
                 updateArithCounts(PC, NULL, arithFirstUseType, arithSecondUseType);
                 arithUpdated = true;
             }
             jsop_stricteq(op);
           END_CASE(JSOP_STRICTEQ)
 
           BEGIN_CASE(JSOP_ITER)
             if (!iter(GET_UINT8(PC)))
                 return Compile_Error;
           END_CASE(JSOP_ITER)
 
           BEGIN_CASE(JSOP_MOREITER)
           {
             /* At the byte level, this is always fused with IFNE or IFNEX. */
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 updatePCCounts(PC, &codeStart, &countsUpdated);
             jsbytecode *target = &PC[JSOP_MOREITER_LENGTH];
             JSOp next = JSOp(*target);
             JS_ASSERT(next == JSOP_IFNE);
 
             target += GET_JUMP_OFFSET(target);
 
             fixDoubleTypes(target);
@@ -2895,48 +2895,48 @@ mjit::Compiler::generateMethod()
             jsop_initelem();
             frame.popn(2);
           END_CASE(JSOP_INITELEM)
 
           BEGIN_CASE(JSOP_INCARG)
           BEGIN_CASE(JSOP_DECARG)
           BEGIN_CASE(JSOP_ARGINC)
           BEGIN_CASE(JSOP_ARGDEC)
-            if (script->hasScriptCounts) {
+            if (script->scriptCounts) {
                 restoreVarType();
                 FrameEntry *fe = frame.getArg(GET_SLOTNO(PC));
                 if (fe->isTypeKnown())
                     arithFirstUseType = fe->getKnownType();
             }
 
             if (!jsop_arginc(op, GET_SLOTNO(PC)))
                 return Compile_Retry;
 
-            if (script->hasScriptCounts) {
+            if (script->scriptCounts) {
                 FrameEntry *fe = frame.getArg(GET_SLOTNO(PC));
                 updateArithCounts(PC, fe, arithFirstUseType, JSVAL_TYPE_INT32);
                 arithUpdated = true;
             }
           END_CASE(JSOP_ARGDEC)
 
           BEGIN_CASE(JSOP_INCLOCAL)
           BEGIN_CASE(JSOP_DECLOCAL)
           BEGIN_CASE(JSOP_LOCALINC)
           BEGIN_CASE(JSOP_LOCALDEC)
-            if (script->hasScriptCounts) {
+            if (script->scriptCounts) {
                 restoreVarType();
                 FrameEntry *fe = frame.getLocal(GET_SLOTNO(PC));
                 if (fe->isTypeKnown())
                     arithFirstUseType = fe->getKnownType();
             }
 
             if (!jsop_localinc(op, GET_SLOTNO(PC)))
                 return Compile_Retry;
 
-            if (script->hasScriptCounts) {
+            if (script->scriptCounts) {
                 FrameEntry *fe = frame.getLocal(GET_SLOTNO(PC));
                 updateArithCounts(PC, fe, arithFirstUseType, JSVAL_TYPE_INT32);
                 arithUpdated = true;
             }
           END_CASE(JSOP_LOCALDEC)
 
           BEGIN_CASE(JSOP_BINDNAME)
             jsop_bindname(script->getName(GET_UINT32_INDEX(PC)));
@@ -3108,17 +3108,17 @@ mjit::Compiler::generateMethod()
           }
           END_CASE(JSOP_OBJECT)
 
           BEGIN_CASE(JSOP_UINT24)
             frame.push(Value(Int32Value((int32_t) GET_UINT24(PC))));
           END_CASE(JSOP_UINT24)
 
           BEGIN_CASE(JSOP_STOP)
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 updatePCCounts(PC, &codeStart, &countsUpdated);
             emitReturn(NULL);
             goto done;
           END_CASE(JSOP_STOP)
 
           BEGIN_CASE(JSOP_GETXPROP)
             if (!jsop_xname(script->getName(GET_UINT32_INDEX(PC))))
                 return Compile_Error;
@@ -3186,17 +3186,17 @@ mjit::Compiler::generateMethod()
                 FrameEntry *fe = frame.getStack(opinfo->stackDepth - nuses + i);
                 if (fe) {
                     /* fe may be NULL for conditionally pushed entries, e.g. JSOP_AND */
                     frame.extra(fe).types = analysis->pushedTypes(lastPC - script->code, i);
                 }
             }
         }
 
-        if (script->hasScriptCounts) {
+        if (script->scriptCounts) {
             size_t length = masm.size() - masm.distanceOf(codeStart);
             bool typesUpdated = false;
 
             /* Update information about the type of value pushed by arithmetic ops. */
             if ((js_CodeSpec[op].format & JOF_ARITH) && !arithUpdated) {
                 FrameEntry *pushed = NULL;
                 if (PC == lastPC + GetBytecodeLength(lastPC))
                     pushed = frame.peek(-1);
@@ -3239,17 +3239,17 @@ mjit::Compiler::generateMethod()
 }
 
 #undef END_CASE
 #undef BEGIN_CASE
 
 void
 mjit::Compiler::updatePCCounts(jsbytecode *pc, Label *start, bool *updated)
 {
-    JS_ASSERT(script->hasScriptCounts);
+    JS_ASSERT(script->scriptCounts);
 
     /*
      * Bump the METHODJIT count for the opcode, read the METHODJIT_CODE_LENGTH
      * and METHODJIT_PICS_LENGTH counts, indicating the amounts of inline path
      * code and generated code, respectively, and add them to the accumulated
      * total for the op.
      */
     uint32_t offset = ssa.frameLength(a->inlineIndex) + pc - script->code;
@@ -3301,17 +3301,17 @@ HasPayloadType(types::TypeSet *types)
     return (flags == types::TYPE_FLAG_UNDEFINED)
         || (flags == types::TYPE_FLAG_NULL)
         || (flags == types::TYPE_FLAG_BOOLEAN);
 }
 
 void
 mjit::Compiler::updatePCTypes(jsbytecode *pc, FrameEntry *fe)
 {
-    JS_ASSERT(script->hasScriptCounts);
+    JS_ASSERT(script->scriptCounts);
 
     /*
      * Get a temporary register, as for updatePCCounts. Don't overlap with
      * the backing store for the entry's type tag, if there is one.
      */
     RegisterID reg = Registers::ReturnReg;
     if (frame.peekTypeInRegister(fe) && reg == frame.tempRegForType(fe)) {
         JS_STATIC_ASSERT(Registers::ReturnReg != Registers::ArgReg1);
@@ -3393,17 +3393,17 @@ mjit::Compiler::updatePCTypes(jsbytecode
     /* Reload the base register's original value. */
     masm.pop(reg);
 }
 
 void
 mjit::Compiler::updateArithCounts(jsbytecode *pc, FrameEntry *fe,
                                   JSValueType firstUseType, JSValueType secondUseType)
 {
-    JS_ASSERT(script->hasScriptCounts);
+    JS_ASSERT(script->scriptCounts);
 
     RegisterID reg = Registers::ReturnReg;
     masm.push(reg);
 
     /*
      * What count we bump for arithmetic expressions depend on the
      * known types of its operands.
      *
@@ -3430,17 +3430,17 @@ mjit::Compiler::updateArithCounts(jsbyte
 
     masm.bumpCount(&script->getPCCounts(pc).get(count), reg);
     masm.pop(reg);
 }
 
 void
 mjit::Compiler::updateElemCounts(jsbytecode *pc, FrameEntry *obj, FrameEntry *id)
 {
-    JS_ASSERT(script->hasScriptCounts);
+    JS_ASSERT(script->scriptCounts);
 
     RegisterID reg = Registers::ReturnReg;
     masm.push(reg);
 
     PCCounts counts = script->getPCCounts(pc);
 
     PCCounts::ElementCounts count;
     if (id->isTypeKnown()) {
@@ -4644,17 +4644,17 @@ mjit::Compiler::emitStubCmpOp(BoolStub s
 void
 mjit::Compiler::jsop_setprop_slow(PropertyName *name)
 {
     prepareStubCall(Uses(2));
     masm.move(ImmPtr(name), Registers::ArgReg1);
     INLINE_STUBCALL(STRICT_VARIANT(stubs::SetName), REJOIN_FALLTHROUGH);
     JS_STATIC_ASSERT(JSOP_SETNAME_LENGTH == JSOP_SETPROP_LENGTH);
     frame.shimmy(1);
-    if (script->hasScriptCounts)
+    if (script->scriptCounts)
         bumpPropCount(PC, PCCounts::PROP_OTHER);
 }
 
 void
 mjit::Compiler::jsop_getprop_slow(PropertyName *name, bool forPrototype)
 {
     /* See ::jsop_getprop */
     RejoinState rejoin = forPrototype ? REJOIN_THIS_PROTOTYPE : REJOIN_GETTER;
@@ -4664,17 +4664,17 @@ mjit::Compiler::jsop_getprop_slow(Proper
     INLINE_STUBCALL(forPrototype ? stubs::GetPropNoCache : stubs::GetProp, rejoin);
 
     if (!forPrototype)
         testPushedType(rejoin, -1, /* ool = */ false);
 
     frame.pop();
     frame.pushSynced(JSVAL_TYPE_UNKNOWN);
 
-    if (script->hasScriptCounts)
+    if (script->scriptCounts)
         bumpPropCount(PC, PCCounts::PROP_OTHER);
 }
 
 #ifdef JS_MONOIC
 void
 mjit::Compiler::passMICAddress(GlobalNameICInfo &ic)
 {
     ic.addrLabel = stubcc.masm.moveWithPatch(ImmPtr(NULL), Registers::ArgReg1);
@@ -4732,17 +4732,17 @@ mjit::Compiler::jsop_getprop(PropertyNam
         /* Check if this is an array we can make a loop invariant entry for. */
         if (loop && loop->generatingInvariants()) {
             CrossSSAValue topv(a->inlineIndex, analysis->poppedValue(PC, 0));
             FrameEntry *fe = loop->invariantLength(topv);
             if (fe) {
                 frame.learnType(fe, JSVAL_TYPE_INT32, false);
                 frame.pop();
                 frame.pushCopyOf(fe);
-                if (script->hasScriptCounts)
+                if (script->scriptCounts)
                     bumpPropCount(PC, PCCounts::PROP_STATIC);
                 return true;
             }
         }
 
         types::TypeSet *types = analysis->poppedTypes(PC, 0);
 
         /*
@@ -4762,17 +4762,17 @@ mjit::Compiler::jsop_getprop(PropertyNam
                     testPushedType(rejoin, -1);
             }
             RegisterID result = frame.allocReg();
             RegisterID reg = frame.tempRegForData(top);
             frame.pop();
             masm.loadPtr(Address(reg, JSObject::offsetOfElements()), result);
             masm.load32(Address(result, ObjectElements::offsetOfLength()), result);
             frame.pushTypedPayload(JSVAL_TYPE_INT32, result);
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 bumpPropCount(PC, PCCounts::PROP_DEFINITE);
             if (!isObject)
                 stubcc.rejoin(Changes(1));
             return true;
         }
 
         /*
          * Check if we're accessing the 'length' property of a typed array.
@@ -4788,31 +4788,31 @@ mjit::Compiler::jsop_getprop(PropertyNam
                 OOL_STUBCALL(stubs::GetProp, rejoin);
                 if (rejoin == REJOIN_GETTER)
                     testPushedType(rejoin, -1);
             }
             RegisterID reg = frame.copyDataIntoReg(top);
             frame.pop();
             masm.loadPayload(Address(reg, TypedArray::lengthOffset()), reg);
             frame.pushTypedPayload(JSVAL_TYPE_INT32, reg);
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 bumpPropCount(PC, PCCounts::PROP_DEFINITE);
             if (!isObject)
                 stubcc.rejoin(Changes(1));
             return true;
         }
 
         /*
          * Check if we are accessing the 'length' of the lazy arguments for the
          * current frame.
          */
         if (types->isMagicArguments(cx)) {
             frame.pop();
             frame.pushWord(Address(JSFrameReg, StackFrame::offsetOfNumActual()), JSVAL_TYPE_INT32);
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 bumpPropCount(PC, PCCounts::PROP_DEFINITE);
             return true;
         }
     }
 
     /* If the access will definitely be fetching a particular value, nop it. */
     bool testObject;
     JSObject *singleton =
@@ -4826,34 +4826,34 @@ mjit::Compiler::jsop_getprop(PropertyNam
             stubcc.masm.move(ImmPtr(name), Registers::ArgReg1);
             OOL_STUBCALL(stubs::GetProp, REJOIN_FALLTHROUGH);
             testPushedType(REJOIN_FALLTHROUGH, -1);
         }
 
         frame.pop();
         frame.push(ObjectValue(*singleton));
 
-        if (script->hasScriptCounts && cx->typeInferenceEnabled())
+        if (script->scriptCounts && cx->typeInferenceEnabled())
             bumpPropCount(PC, PCCounts::PROP_STATIC);
 
         if (testObject)
             stubcc.rejoin(Changes(1));
 
         return true;
     }
 
     /* Check if this is a property access we can make a loop invariant entry for. */
     if (loop && loop->generatingInvariants() && !hasTypeBarriers(PC)) {
         CrossSSAValue topv(a->inlineIndex, analysis->poppedValue(PC, 0));
         if (FrameEntry *fe = loop->invariantProperty(topv, ATOM_TO_JSID(name))) {
             if (knownType != JSVAL_TYPE_UNKNOWN && knownType != JSVAL_TYPE_DOUBLE)
                 frame.learnType(fe, knownType, false);
             frame.pop();
             frame.pushCopyOf(fe);
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 bumpPropCount(PC, PCCounts::PROP_STATIC);
             return true;
         }
     }
 
     /* If the incoming type will never PIC, take slow path. */
     if (top->isNotType(JSVAL_TYPE_OBJECT)) {
         jsop_getprop_slow(name, forPrototype);
@@ -4891,17 +4891,17 @@ mjit::Compiler::jsop_getprop(PropertyNam
                 stubcc.masm.move(ImmPtr(name), Registers::ArgReg1);
                 OOL_STUBCALL(stubs::GetProp, rejoin);
                 if (rejoin == REJOIN_GETTER)
                     testPushedType(rejoin, -1);
             }
             RegisterID reg = frame.tempRegForData(top);
             frame.pop();
 
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 bumpPropCount(PC, PCCounts::PROP_DEFINITE);
 
             Address address(reg, JSObject::getFixedSlotOffset(slot));
             BarrierState barrier = pushAddressMaybeBarrier(address, knownType, false);
             if (!isObject)
                 stubcc.rejoin(Changes(1));
             finishBarrier(barrier, rejoin, 0);
 
@@ -4910,17 +4910,17 @@ mjit::Compiler::jsop_getprop(PropertyNam
     }
 
     /* Check for a dynamic dispatch. */
     if (cx->typeInferenceEnabled()) {
         if (*PC == JSOP_CALLPROP && jsop_getprop_dispatch(name))
             return true;
     }
 
-    if (script->hasScriptCounts)
+    if (script->scriptCounts)
         bumpPropCount(PC, PCCounts::PROP_OTHER);
 
     /*
      * These two must be loaded first. The objReg because the string path
      * wants to read it, and the shapeReg because it could cause a spill that
      * the string path wouldn't sink back.
      */
     RegisterID objReg = frame.copyDataIntoReg(top);
@@ -5272,17 +5272,17 @@ mjit::Compiler::jsop_getprop_dispatch(Pr
     stubcc.leave();
     stubcc.masm.move(ImmPtr(name), Registers::ArgReg1);
     OOL_STUBCALL(stubs::GetProp, REJOIN_FALLTHROUGH);
     testPushedType(REJOIN_FALLTHROUGH, -1);
 
     frame.pop();
     frame.pushTypedPayload(JSVAL_TYPE_OBJECT, pushreg);
 
-    if (script->hasScriptCounts)
+    if (script->scriptCounts)
         bumpPropCount(PC, PCCounts::PROP_DEFINITE);
 
     stubcc.rejoin(Changes(2));
     return true;
 }
 
 bool
 mjit::Compiler::jsop_setprop(PropertyName *name, bool popGuaranteed)
@@ -5375,23 +5375,23 @@ mjit::Compiler::jsop_setprop(PropertyNam
                 stubcc.leave();
                 stubcc.masm.move(ImmPtr(name), Registers::ArgReg1);
                 OOL_STUBCALL(STRICT_VARIANT(stubs::SetName), REJOIN_FALLTHROUGH);
             }
             frame.storeTo(rhs, Address(reg, JSObject::getFixedSlotOffset(slot)), popGuaranteed);
             frame.shimmy(1);
             if (!isObject)
                 stubcc.rejoin(Changes(1));
-            if (script->hasScriptCounts)
+            if (script->scriptCounts)
                 bumpPropCount(PC, PCCounts::PROP_DEFINITE);
             return true;
         }
     }
 
-    if (script->hasScriptCounts)
+    if (script->scriptCounts)
         bumpPropCount(PC, PCCounts::PROP_OTHER);
 
     JSOp op = JSOp(*PC);
 
 #ifdef JSGC_INCREMENTAL_MJ
     /* Write barrier. We don't have type information for JSOP_SETNAME. */
     if (cx->compartment->needsBarrier() &&
         (!types || op == JSOP_SETNAME || types->propertyNeedsBarrier(cx, id)))