Bug 739512: fix Mac and Windows bustage caused by patch 3. r=me.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 07 May 2012 10:53:56 +1000
changeset 93329 a12879dc977621a89a5f273efdec22efe0f2aafc
parent 93328 25d54e0cdf317284b4339f62f800965381477273
child 93330 241b44d55176dd28e2fdcce816452613fb7388de
push id9076
push usernnethercote@mozilla.com
push dateMon, 07 May 2012 00:54:57 +0000
treeherdermozilla-inbound@a12879dc9776 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs739512
milestone15.0a1
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
Bug 739512: fix Mac and Windows bustage caused by patch 3. r=me.
js/src/jsscript.h
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -503,35 +503,36 @@ struct JSScript : public js::gc::Cell
     uint16_t        nslots;     /* vars plus maximum stack depth */
     uint16_t        staticLevel;/* static level for display maintenance */
 
   private:
     uint16_t        argsSlot_;  /* slot holding 'arguments' (if argumentsHasLocalBindings) */
 
     // 8-bit fields.
 
-  private:
-    // The bits in this field indicate the presence/non-presence of several
-    // optional arrays in |data|.  See the comments above NewScript() for
-    // details.
-    uint8_t         hasArrayBits;
-
+  public:
     // The kinds of the optional arrays.
-  public:
     enum ArrayKind {
         CONSTS,
         OBJECTS,
         REGEXPS,
         TRYNOTES,
         GLOBALS,
         CLOSED_ARGS,
         CLOSED_VARS,
         LIMIT
     };
-    JS_STATIC_ASSERT(sizeof(hasArrayBits) * 8 >= LIMIT);
+
+    typedef uint8_t ArrayBitsT;
+
+  private:
+    // The bits in this field indicate the presence/non-presence of several
+    // optional arrays in |data|.  See the comments above NewScript() for
+    // details.
+    ArrayBitsT      hasArrayBits;
 
     // 1-bit fields.
 
   public:
     bool            noScriptRval:1; /* no need for result value of last
                                        expression statement */
     bool            savedCallerFun:1; /* can call getCallerFunction() */
     bool            strictModeCode:1; /* code is in strict mode */
@@ -932,16 +933,18 @@ struct JSScript : public js::gc::Cell
     static JSPrincipals *normalizeOriginPrincipals(JSPrincipals *principals,
                                                    JSPrincipals *originPrincipals) {
         return originPrincipals ? originPrincipals : principals;
     }
 
     void markChildren(JSTracer *trc);
 };
 
+JS_STATIC_ASSERT(sizeof(JSScript::ArrayBitsT) * 8 >= JSScript::LIMIT);
+
 /* If this fails, add/remove padding within JSScript. */
 JS_STATIC_ASSERT(sizeof(JSScript) % js::gc::Cell::CellSize == 0);
 
 static JS_INLINE unsigned
 StackDepth(JSScript *script)
 {
     return script->nslots - script->nfixed;
 }