Bug 731492: Remove obsolete typedef JSPackedBool, r=luke
authorDavid Mandelin <dmandelin@mozilla.com>
Tue, 28 Feb 2012 19:03:57 -0800
changeset 88029 af34717441cd36b1a2c9a43cf992f11818055524
parent 88028 eb9b3853f6c1bb3ca69499ed100ae4514dd05de9
child 88030 51c1a0cd1efe440ad731f50149b1be05b6b5a70b
push id6640
push userdmandelin@mozilla.com
push dateThu, 01 Mar 2012 01:42:22 +0000
treeherdermozilla-inbound@af34717441cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs731492
milestone13.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 731492: Remove obsolete typedef JSPackedBool, r=luke
js/public/TemplateLib.h
js/src/frontend/TokenStream.h
js/src/jsanalyze.cpp
js/src/jsanalyze.h
js/src/jsapi.cpp
js/src/jscntxt.h
js/src/jstypes.h
--- a/js/public/TemplateLib.h
+++ b/js/public/TemplateLib.h
@@ -160,16 +160,17 @@ template <> struct IsPodType<unsigned ch
 template <> struct IsPodType<short>                 { static const bool result = true; };
 template <> struct IsPodType<unsigned short>        { static const bool result = true; };
 template <> struct IsPodType<int>                   { static const bool result = true; };
 template <> struct IsPodType<unsigned int>          { static const bool result = true; };
 template <> struct IsPodType<long>                  { static const bool result = true; };
 template <> struct IsPodType<unsigned long>         { static const bool result = true; };
 template <> struct IsPodType<long long>             { static const bool result = true; };
 template <> struct IsPodType<unsigned long long>    { static const bool result = true; };
+template <> struct IsPodType<bool>                  { static const bool result = true; };
 template <> struct IsPodType<float>                 { static const bool result = true; };
 template <> struct IsPodType<double>                { static const bool result = true; };
 template <> struct IsPodType<wchar_t>               { static const bool result = true; };
 template <typename T> struct IsPodType<T *>         { static const bool result = true; };
 
 template <bool cond, typename T, T v1, T v2> struct If        { static const T result = v1; };
 template <typename T, T v1, T v2> struct If<false, T, v1, v2> { static const T result = v2; };
 
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -815,18 +815,18 @@ class TokenStream
     const jschar        *linebase;      /* start of current line;  points into userbuf */
     const jschar        *prevLinebase;  /* start of previous line;  NULL if on the first line */
     TokenBuf            userbuf;        /* user input buffer */
     const char          *filename;      /* input filename or null */
     jschar              *sourceMap;     /* source map's filename or null */
     void                *listenerTSData;/* listener data for this TokenStream */
     CharBuffer          tokenbuf;       /* current token string buffer */
     int8_t              oneCharTokens[128];  /* table of one-char tokens */
-    JSPackedBool        maybeEOL[256];       /* probabilistic EOL lookup table */
-    JSPackedBool        maybeStrSpecial[256];/* speeds up string scanning */
+    bool                maybeEOL[256];       /* probabilistic EOL lookup table */
+    bool                maybeStrSpecial[256];/* speeds up string scanning */
     JSVersion           version;        /* (i.e. to identify keywords) */
     bool                xml;            /* see JSOPTION_XML */
     JSContext           *const cx;
     JSPrincipals        *const originPrincipals;
 };
 
 struct KeywordInfo {
     const char  *chars;         /* C string with keyword text */
--- a/js/src/jsanalyze.cpp
+++ b/js/src/jsanalyze.cpp
@@ -143,17 +143,17 @@ ScriptAnalysis::analyzeBytecode(JSContex
     LifoAlloc &tla = cx->typeLifoAlloc();
 
     unsigned length = script->length;
     unsigned nargs = script->function() ? script->function()->nargs : 0;
 
     numSlots = TotalSlots(script);
 
     codeArray = tla.newArray<Bytecode*>(length);
-    escapedSlots = tla.newArray<JSPackedBool>(numSlots);
+    escapedSlots = tla.newArray<bool>(numSlots);
 
     if (!codeArray || !escapedSlots) {
         setOOM(cx);
         return;
     }
 
     PodZero(codeArray, length);
 
--- a/js/src/jsanalyze.h
+++ b/js/src/jsanalyze.h
@@ -848,17 +848,17 @@ class ScriptAnalysis
 
     Bytecode **codeArray;
 
     uint32_t numSlots;
 
     bool outOfMemory;
     bool hadFailure;
 
-    JSPackedBool *escapedSlots;
+    bool *escapedSlots;
 
     /* Which analyses have been performed. */
     bool ranBytecode_;
     bool ranSSA_;
     bool ranLifetimes_;
     bool ranInference_;
 
 #ifdef DEBUG
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -6465,17 +6465,17 @@ JS_ClearPendingException(JSContext *cx)
     AssertNoGC(cx);
     cx->clearPendingException();
 }
 
 JS_PUBLIC_API(JSBool)
 JS_ReportPendingException(JSContext *cx)
 {
     JSBool ok;
-    JSPackedBool save;
+    bool save;
 
     AssertNoGC(cx);
     CHECK_REQUEST(cx);
 
     /*
      * Set cx->generatingError to suppress the standard error-to-exception
      * conversion done by all {js,JS}_Report* functions except for OOM.  The
      * cx->generatingError flag was added to suppress recursive divergence
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -841,17 +841,17 @@ struct JSContext : js::ContextFriendFiel
     JSLocaleCallbacks   *localeCallbacks;
 
     js::AutoResolving   *resolvingList;
 
     /*
      * True if generating an error, to prevent runaway recursion.
      * NB: generatingError packs with throwing below.
      */
-    JSPackedBool        generatingError;
+    bool        generatingError;
 
     /* GC heap compartment. */
     JSCompartment       *compartment;
 
     inline void setCompartment(JSCompartment *compartment);
 
     /* Current execution stack. */
     js::ContextStack    stack;
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -226,24 +226,16 @@ JS_BEGIN_EXTERN_C
 **      for clarity of target type in assignments and actual arguments. Use
 **      'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans
 **      just as you would C int-valued conditions.
 ************************************************************************/
 typedef int JSBool;
 #define JS_TRUE (int)1
 #define JS_FALSE (int)0
 
-/************************************************************************
-** TYPES:       JSPackedBool
-** DESCRIPTION:
-**  Use JSPackedBool within structs where bitfields are not desireable
-**      but minimum and consistent overhead matters.
-************************************************************************/
-typedef uint8_t JSPackedBool;
-
 /***********************************************************************
 ** MACROS:      JS_LIKELY
 **              JS_UNLIKELY
 ** DESCRIPTION:
 **      These macros allow you to give a hint to the compiler about branch
 **      probability so that it can better optimize.  Use them like this:
 **
 **      if (JS_LIKELY(v == 1)) {