From f2a90de0cb511b1e236edab42cbc309064a605d9 Mon Sep 17 00:00:00 2001 From: David Mandelin Date: Tue, 28 Feb 2012 19:03:57 -0800 Subject: [PATCH] Bug 731492: Remove obsolete typedef JSPackedBool, r=luke --HG-- extra : rebase_source : 95423985f55547755a988ba19629678997bfa553 --- js/public/TemplateLib.h | 1 + js/src/frontend/TokenStream.h | 4 ++-- js/src/jsanalyze.cpp | 2 +- js/src/jsanalyze.h | 2 +- js/src/jsapi.cpp | 2 +- js/src/jscntxt.h | 2 +- js/src/jstypes.h | 8 -------- 7 files changed, 7 insertions(+), 14 deletions(-) diff --git a/js/public/TemplateLib.h b/js/public/TemplateLib.h index 9cdef99ba7aa..10d609fd4b46 100644 --- a/js/public/TemplateLib.h +++ b/js/public/TemplateLib.h @@ -165,6 +165,7 @@ template <> struct IsPodType { static const bool result = template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; template <> struct IsPodType { static const bool result = true; }; diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h index 41f4f445a949..a5ecb7f8f6e6 100644 --- a/js/src/frontend/TokenStream.h +++ b/js/src/frontend/TokenStream.h @@ -820,8 +820,8 @@ class TokenStream 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; diff --git a/js/src/jsanalyze.cpp b/js/src/jsanalyze.cpp index 49399aaa0632..5552a957bb9e 100644 --- a/js/src/jsanalyze.cpp +++ b/js/src/jsanalyze.cpp @@ -148,7 +148,7 @@ ScriptAnalysis::analyzeBytecode(JSContext *cx) numSlots = TotalSlots(script); codeArray = tla.newArray(length); - escapedSlots = tla.newArray(numSlots); + escapedSlots = tla.newArray(numSlots); if (!codeArray || !escapedSlots) { setOOM(cx); diff --git a/js/src/jsanalyze.h b/js/src/jsanalyze.h index 2b9fc4cfdc9e..23f4a3fc06c2 100644 --- a/js/src/jsanalyze.h +++ b/js/src/jsanalyze.h @@ -853,7 +853,7 @@ class ScriptAnalysis bool outOfMemory; bool hadFailure; - JSPackedBool *escapedSlots; + bool *escapedSlots; /* Which analyses have been performed. */ bool ranBytecode_; diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 70c3a5a2bae2..e306f2952db3 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -6470,7 +6470,7 @@ JS_PUBLIC_API(JSBool) JS_ReportPendingException(JSContext *cx) { JSBool ok; - JSPackedBool save; + bool save; AssertNoGC(cx); CHECK_REQUEST(cx); diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index 2bd18f7d47e4..6289d6324d3e 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -846,7 +846,7 @@ struct JSContext : js::ContextFriendFields * True if generating an error, to prevent runaway recursion. * NB: generatingError packs with throwing below. */ - JSPackedBool generatingError; + bool generatingError; /* GC heap compartment. */ JSCompartment *compartment; diff --git a/js/src/jstypes.h b/js/src/jstypes.h index b9aaa0ff945d..b2886110ca0d 100644 --- a/js/src/jstypes.h +++ b/js/src/jstypes.h @@ -231,14 +231,6 @@ 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