Bug 731492: Remove obsolete typedef JSPackedBool, r=luke

--HG--
extra : rebase_source : 95423985f55547755a988ba19629678997bfa553
This commit is contained in:
David Mandelin 2012-02-28 19:03:57 -08:00
Родитель b11d895a75
Коммит f2a90de0cb
7 изменённых файлов: 7 добавлений и 14 удалений

Просмотреть файл

@ -165,6 +165,7 @@ template <> struct IsPodType<long> { static const bool result =
template <> struct IsPodType<unsigned 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<long long> { static const bool result = true; };
template <> struct IsPodType<unsigned 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<float> { static const bool result = true; };
template <> struct IsPodType<double> { 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 <> struct IsPodType<wchar_t> { static const bool result = true; };

Просмотреть файл

@ -820,8 +820,8 @@ class TokenStream
void *listenerTSData;/* listener data for this TokenStream */ void *listenerTSData;/* listener data for this TokenStream */
CharBuffer tokenbuf; /* current token string buffer */ CharBuffer tokenbuf; /* current token string buffer */
int8_t oneCharTokens[128]; /* table of one-char tokens */ int8_t oneCharTokens[128]; /* table of one-char tokens */
JSPackedBool maybeEOL[256]; /* probabilistic EOL lookup table */ bool maybeEOL[256]; /* probabilistic EOL lookup table */
JSPackedBool maybeStrSpecial[256];/* speeds up string scanning */ bool maybeStrSpecial[256];/* speeds up string scanning */
JSVersion version; /* (i.e. to identify keywords) */ JSVersion version; /* (i.e. to identify keywords) */
bool xml; /* see JSOPTION_XML */ bool xml; /* see JSOPTION_XML */
JSContext *const cx; JSContext *const cx;

Просмотреть файл

@ -148,7 +148,7 @@ ScriptAnalysis::analyzeBytecode(JSContext *cx)
numSlots = TotalSlots(script); numSlots = TotalSlots(script);
codeArray = tla.newArray<Bytecode*>(length); codeArray = tla.newArray<Bytecode*>(length);
escapedSlots = tla.newArray<JSPackedBool>(numSlots); escapedSlots = tla.newArray<bool>(numSlots);
if (!codeArray || !escapedSlots) { if (!codeArray || !escapedSlots) {
setOOM(cx); setOOM(cx);

Просмотреть файл

@ -853,7 +853,7 @@ class ScriptAnalysis
bool outOfMemory; bool outOfMemory;
bool hadFailure; bool hadFailure;
JSPackedBool *escapedSlots; bool *escapedSlots;
/* Which analyses have been performed. */ /* Which analyses have been performed. */
bool ranBytecode_; bool ranBytecode_;

Просмотреть файл

@ -6470,7 +6470,7 @@ JS_PUBLIC_API(JSBool)
JS_ReportPendingException(JSContext *cx) JS_ReportPendingException(JSContext *cx)
{ {
JSBool ok; JSBool ok;
JSPackedBool save; bool save;
AssertNoGC(cx); AssertNoGC(cx);
CHECK_REQUEST(cx); CHECK_REQUEST(cx);

Просмотреть файл

@ -846,7 +846,7 @@ struct JSContext : js::ContextFriendFields
* True if generating an error, to prevent runaway recursion. * True if generating an error, to prevent runaway recursion.
* NB: generatingError packs with throwing below. * NB: generatingError packs with throwing below.
*/ */
JSPackedBool generatingError; bool generatingError;
/* GC heap compartment. */ /* GC heap compartment. */
JSCompartment *compartment; JSCompartment *compartment;

Просмотреть файл

@ -231,14 +231,6 @@ typedef int JSBool;
#define JS_TRUE (int)1 #define JS_TRUE (int)1
#define JS_FALSE (int)0 #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 ** MACROS: JS_LIKELY
** JS_UNLIKELY ** JS_UNLIKELY