From 613f8f933cf9614261ee8734677f5f1e1dd77dc6 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 13 Aug 2012 20:02:51 -0700 Subject: [PATCH] Bug 782487 - Remove traces of JSStaticAtom. r=billm. --HG-- extra : rebase_source : 89e892e3e6ca04f0c19747f189535b3e3ae95d77 --- js/src/jsprvtd.h | 1 - js/src/vm/String-inl.h | 2 +- js/src/vm/String.h | 7 +++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/js/src/jsprvtd.h b/js/src/jsprvtd.h index df0d3717625..f41d05d37ff 100644 --- a/js/src/jsprvtd.h +++ b/js/src/jsprvtd.h @@ -82,7 +82,6 @@ class JSExtensibleString; class JSExternalString; class JSLinearString; class JSFixedString; -class JSStaticAtom; class JSRope; class JSAtom; class JSWrapper; diff --git a/js/src/vm/String-inl.h b/js/src/vm/String-inl.h index a9761a57a8a..7460e2ec500 100644 --- a/js/src/vm/String-inl.h +++ b/js/src/vm/String-inl.h @@ -213,7 +213,7 @@ JSFixedString::new_(JSContext *cx, const jschar *chars, size_t length) JS_ALWAYS_INLINE JSAtom * JSFixedString::morphAtomizedStringIntoAtom() { - d.lengthAndFlags = buildLengthAndFlags(length(), NON_STATIC_ATOM_FLAGS); + d.lengthAndFlags = buildLengthAndFlags(length(), ATOM_FLAGS); return &asAtom(); } diff --git a/js/src/vm/String.h b/js/src/vm/String.h index 39a5bf9c8aa..9fb17513163 100644 --- a/js/src/vm/String.h +++ b/js/src/vm/String.h @@ -168,8 +168,8 @@ class JSString : public js::gc::Cell * * Instead of using a dense index to represent the most-derived type, string * types are encoded to allow single-op tests for hot queries (isRope, - * isDependent, isFlat, isAtom, isStaticAtom) which, in view of subtyping, - * would require slower (isX() || isY() || isZ()). + * isDependent, isFlat, isAtom) which, in view of subtyping, would require + * slower (isX() || isY() || isZ()). * * The string type encoding can be summarized as follows. The "instance * encoding" entry for a type specifies the flag bits used to create a @@ -194,7 +194,6 @@ class JSString : public js::gc::Cell * Atom 1000 x000 * InlineAtom 1000 1000 && is Inline * ShortAtom 1000 1000 && is Short - * StaticAtom 0000 0000 */ static const size_t LENGTH_SHIFT = 4; @@ -208,7 +207,7 @@ class JSString : public js::gc::Cell static const size_t UNDEPENDED_FLAGS = JS_BIT(1) | JS_BIT(3); static const size_t ATOM_MASK = JS_BITMASK(3); - static const size_t NON_STATIC_ATOM_FLAGS = JS_BIT(3); + static const size_t ATOM_FLAGS = JS_BIT(3); static const size_t MAX_LENGTH = JS_BIT(32 - LENGTH_SHIFT) - 1;