Bug 843402 - Make all always-inlined methods just inline, and let the compiler choose how to optimize. r=http://perf.snarkfest.net/compare-talos/index.html?oldRevs=7ad145f9b092&newRev=6be7cad95d97&submit=true is a wash
authorJeff Walden <jwalden@mit.edu>
Mon, 04 Mar 2013 09:41:11 -0800
changeset 124725 5d58b6d250d56de5196bdb84b7ddedffb3880d7f
parent 124724 d0ad849d2bd0722205fc6cabdf5a70ffee535274
child 124726 0531bbbb0ee13a0af433061cf2a0c2b22b3c8be1
push id24433
push useremorley@mozilla.com
push dateThu, 14 Mar 2013 12:21:10 +0000
treeherdermozilla-central@96af92fa87fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershttp
bugs843402
milestone22.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 843402 - Make all always-inlined methods just inline, and let the compiler choose how to optimize. r=http://perf.snarkfest.net/compare-talos/index.html?oldRevs=7ad145f9b092&newRev=6be7cad95d97&submit=true is a wash
js/public/Value.h
--- a/js/public/Value.h
+++ b/js/public/Value.h
@@ -337,490 +337,490 @@ JS_STATIC_ASSERT(sizeof(jsval_layout) ==
 #if JS_BITS_PER_WORD == 32
 
 /*
  * N.B. GCC, in some but not all cases, chooses to emit signed comparison of
  * JSValueTag even though its underlying type has been forced to be uint32_t.
  * Thus, all comparisons should explicitly cast operands to uint32_t.
  */
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 BUILD_JSVAL(JSValueTag tag, uint32_t payload)
 {
     jsval_layout l;
     l.asBits = (((uint64_t)(uint32_t)tag) << 32) | payload;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_DOUBLE_IMPL(jsval_layout l)
 {
     return (uint32_t)l.s.tag <= (uint32_t)JSVAL_TAG_CLEAR;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 DOUBLE_TO_JSVAL_IMPL(double d)
 {
     jsval_layout l;
     l.asDouble = d;
     MOZ_ASSERT(JSVAL_IS_DOUBLE_IMPL(l));
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_INT32_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_INT32;
 }
 
-static MOZ_ALWAYS_INLINE int32_t
+static inline int32_t
 JSVAL_TO_INT32_IMPL(jsval_layout l)
 {
     return l.s.payload.i32;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 INT32_TO_JSVAL_IMPL(int32_t i)
 {
     jsval_layout l;
     l.s.tag = JSVAL_TAG_INT32;
     l.s.payload.i32 = i;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_NUMBER_IMPL(jsval_layout l)
 {
     JSValueTag tag = l.s.tag;
     MOZ_ASSERT(tag != JSVAL_TAG_CLEAR);
     return (uint32_t)tag <= (uint32_t)JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_UNDEFINED_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_UNDEFINED;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_STRING_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_STRING;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 STRING_TO_JSVAL_IMPL(JSString *str)
 {
     jsval_layout l;
     MOZ_ASSERT(str);
     l.s.tag = JSVAL_TAG_STRING;
     l.s.payload.str = str;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSString *
+static inline JSString *
 JSVAL_TO_STRING_IMPL(jsval_layout l)
 {
     return l.s.payload.str;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_BOOLEAN_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_BOOLEAN;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_TO_BOOLEAN_IMPL(jsval_layout l)
 {
     return l.s.payload.boo;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 BOOLEAN_TO_JSVAL_IMPL(JSBool b)
 {
     jsval_layout l;
     MOZ_ASSERT(b == JS_TRUE || b == JS_FALSE);
     l.s.tag = JSVAL_TAG_BOOLEAN;
     l.s.payload.boo = b;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_MAGIC_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_MAGIC;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_OBJECT_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_OBJECT;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_PRIMITIVE_IMPL(jsval_layout l)
 {
     return (uint32_t)l.s.tag < (uint32_t)JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_OBJECT_OR_NULL_IMPL(jsval_layout l)
 {
     MOZ_ASSERT((uint32_t)l.s.tag <= (uint32_t)JSVAL_TAG_OBJECT);
     return (uint32_t)l.s.tag >= (uint32_t)JSVAL_LOWER_INCL_TAG_OF_OBJ_OR_NULL_SET;
 }
 
-static MOZ_ALWAYS_INLINE JSObject *
+static inline JSObject *
 JSVAL_TO_OBJECT_IMPL(jsval_layout l)
 {
     return l.s.payload.obj;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 OBJECT_TO_JSVAL_IMPL(JSObject *obj)
 {
     jsval_layout l;
     MOZ_ASSERT(obj);
     l.s.tag = JSVAL_TAG_OBJECT;
     l.s.payload.obj = obj;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_NULL_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_NULL;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 PRIVATE_PTR_TO_JSVAL_IMPL(void *ptr)
 {
     jsval_layout l;
     MOZ_ASSERT(((uint32_t)ptr & 1) == 0);
     l.s.tag = (JSValueTag)0;
     l.s.payload.ptr = ptr;
     MOZ_ASSERT(JSVAL_IS_DOUBLE_IMPL(l));
     return l;
 }
 
-static MOZ_ALWAYS_INLINE void *
+static inline void *
 JSVAL_TO_PRIVATE_PTR_IMPL(jsval_layout l)
 {
     return l.s.payload.ptr;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_GCTHING_IMPL(jsval_layout l)
 {
     /* gcc sometimes generates signed < without explicit casts. */
     return (uint32_t)l.s.tag >= (uint32_t)JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET;
 }
 
-static MOZ_ALWAYS_INLINE void *
+static inline void *
 JSVAL_TO_GCTHING_IMPL(jsval_layout l)
 {
     return l.s.payload.ptr;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_TRACEABLE_IMPL(jsval_layout l)
 {
     return l.s.tag == JSVAL_TAG_STRING || l.s.tag == JSVAL_TAG_OBJECT;
 }
 
-static MOZ_ALWAYS_INLINE uint32_t
+static inline uint32_t
 JSVAL_TRACE_KIND_IMPL(jsval_layout l)
 {
     return (uint32_t)(JSBool)JSVAL_IS_STRING_IMPL(l);
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_SPECIFIC_INT32_IMPL(jsval_layout l, int32_t i32)
 {
     return l.s.tag == JSVAL_TAG_INT32 && l.s.payload.i32 == i32;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_SPECIFIC_BOOLEAN(jsval_layout l, JSBool b)
 {
     return (l.s.tag == JSVAL_TAG_BOOLEAN) && (l.s.payload.boo == b);
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 MAGIC_TO_JSVAL_IMPL(JSWhyMagic why)
 {
     jsval_layout l;
     l.s.tag = JSVAL_TAG_MAGIC;
     l.s.payload.why = why;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_SAME_TYPE_IMPL(jsval_layout lhs, jsval_layout rhs)
 {
     JSValueTag ltag = lhs.s.tag, rtag = rhs.s.tag;
     return ltag == rtag || (ltag < JSVAL_TAG_CLEAR && rtag < JSVAL_TAG_CLEAR);
 }
 
-static MOZ_ALWAYS_INLINE JSValueType
+static inline JSValueType
 JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(jsval_layout l)
 {
     uint32_t type = l.s.tag & 0xF;
     MOZ_ASSERT(type > JSVAL_TYPE_DOUBLE);
     return (JSValueType)type;
 }
 
 #elif JS_BITS_PER_WORD == 64
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 BUILD_JSVAL(JSValueTag tag, uint64_t payload)
 {
     jsval_layout l;
     l.asBits = (((uint64_t)(uint32_t)tag) << JSVAL_TAG_SHIFT) | payload;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_DOUBLE_IMPL(jsval_layout l)
 {
     return l.asBits <= JSVAL_SHIFTED_TAG_MAX_DOUBLE;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 DOUBLE_TO_JSVAL_IMPL(double d)
 {
     jsval_layout l;
     l.asDouble = d;
     MOZ_ASSERT(l.asBits <= JSVAL_SHIFTED_TAG_MAX_DOUBLE);
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_INT32_IMPL(jsval_layout l)
 {
     return (uint32_t)(l.asBits >> JSVAL_TAG_SHIFT) == JSVAL_TAG_INT32;
 }
 
-static MOZ_ALWAYS_INLINE int32_t
+static inline int32_t
 JSVAL_TO_INT32_IMPL(jsval_layout l)
 {
     return (int32_t)l.asBits;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 INT32_TO_JSVAL_IMPL(int32_t i32)
 {
     jsval_layout l;
     l.asBits = ((uint64_t)(uint32_t)i32) | JSVAL_SHIFTED_TAG_INT32;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_NUMBER_IMPL(jsval_layout l)
 {
     return l.asBits < JSVAL_UPPER_EXCL_SHIFTED_TAG_OF_NUMBER_SET;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_UNDEFINED_IMPL(jsval_layout l)
 {
     return l.asBits == JSVAL_SHIFTED_TAG_UNDEFINED;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_STRING_IMPL(jsval_layout l)
 {
     return (uint32_t)(l.asBits >> JSVAL_TAG_SHIFT) == JSVAL_TAG_STRING;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 STRING_TO_JSVAL_IMPL(JSString *str)
 {
     jsval_layout l;
     uint64_t strBits = (uint64_t)str;
     MOZ_ASSERT(str);
     MOZ_ASSERT((strBits >> JSVAL_TAG_SHIFT) == 0);
     l.asBits = strBits | JSVAL_SHIFTED_TAG_STRING;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSString *
+static inline JSString *
 JSVAL_TO_STRING_IMPL(jsval_layout l)
 {
     return (JSString *)(l.asBits & JSVAL_PAYLOAD_MASK);
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_BOOLEAN_IMPL(jsval_layout l)
 {
     return (uint32_t)(l.asBits >> JSVAL_TAG_SHIFT) == JSVAL_TAG_BOOLEAN;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_TO_BOOLEAN_IMPL(jsval_layout l)
 {
     return (JSBool)l.asBits;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 BOOLEAN_TO_JSVAL_IMPL(JSBool b)
 {
     jsval_layout l;
     MOZ_ASSERT(b == JS_TRUE || b == JS_FALSE);
     l.asBits = ((uint64_t)(uint32_t)b) | JSVAL_SHIFTED_TAG_BOOLEAN;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_MAGIC_IMPL(jsval_layout l)
 {
     return (l.asBits >> JSVAL_TAG_SHIFT) == JSVAL_TAG_MAGIC;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_PRIMITIVE_IMPL(jsval_layout l)
 {
     return l.asBits < JSVAL_UPPER_EXCL_SHIFTED_TAG_OF_PRIMITIVE_SET;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_OBJECT_IMPL(jsval_layout l)
 {
     MOZ_ASSERT((l.asBits >> JSVAL_TAG_SHIFT) <= JSVAL_SHIFTED_TAG_OBJECT);
     return l.asBits >= JSVAL_SHIFTED_TAG_OBJECT;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_OBJECT_OR_NULL_IMPL(jsval_layout l)
 {
     MOZ_ASSERT((l.asBits >> JSVAL_TAG_SHIFT) <= JSVAL_TAG_OBJECT);
     return l.asBits >= JSVAL_LOWER_INCL_SHIFTED_TAG_OF_OBJ_OR_NULL_SET;
 }
 
-static MOZ_ALWAYS_INLINE JSObject *
+static inline JSObject *
 JSVAL_TO_OBJECT_IMPL(jsval_layout l)
 {
     uint64_t ptrBits = l.asBits & JSVAL_PAYLOAD_MASK;
     MOZ_ASSERT((ptrBits & 0x7) == 0);
     return (JSObject *)ptrBits;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 OBJECT_TO_JSVAL_IMPL(JSObject *obj)
 {
     jsval_layout l;
     uint64_t objBits = (uint64_t)obj;
     MOZ_ASSERT(obj);
     MOZ_ASSERT((objBits >> JSVAL_TAG_SHIFT) == 0);
     l.asBits = objBits | JSVAL_SHIFTED_TAG_OBJECT;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_NULL_IMPL(jsval_layout l)
 {
     return l.asBits == JSVAL_SHIFTED_TAG_NULL;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_GCTHING_IMPL(jsval_layout l)
 {
     return l.asBits >= JSVAL_LOWER_INCL_SHIFTED_TAG_OF_GCTHING_SET;
 }
 
-static MOZ_ALWAYS_INLINE void *
+static inline void *
 JSVAL_TO_GCTHING_IMPL(jsval_layout l)
 {
     uint64_t ptrBits = l.asBits & JSVAL_PAYLOAD_MASK;
     MOZ_ASSERT((ptrBits & 0x7) == 0);
     return (void *)ptrBits;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_TRACEABLE_IMPL(jsval_layout l)
 {
     return JSVAL_IS_GCTHING_IMPL(l) && !JSVAL_IS_NULL_IMPL(l);
 }
 
-static MOZ_ALWAYS_INLINE uint32_t
+static inline uint32_t
 JSVAL_TRACE_KIND_IMPL(jsval_layout l)
 {
     return (uint32_t)(JSBool)!(JSVAL_IS_OBJECT_IMPL(l));
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 PRIVATE_PTR_TO_JSVAL_IMPL(void *ptr)
 {
     jsval_layout l;
     uint64_t ptrBits = (uint64_t)ptr;
     MOZ_ASSERT((ptrBits & 1) == 0);
     l.asBits = ptrBits >> 1;
     MOZ_ASSERT(JSVAL_IS_DOUBLE_IMPL(l));
     return l;
 }
 
-static MOZ_ALWAYS_INLINE void *
+static inline void *
 JSVAL_TO_PRIVATE_PTR_IMPL(jsval_layout l)
 {
     MOZ_ASSERT((l.asBits & 0x8000000000000000LL) == 0);
     return (void *)(l.asBits << 1);
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_SPECIFIC_INT32_IMPL(jsval_layout l, int32_t i32)
 {
     return l.asBits == (((uint64_t)(uint32_t)i32) | JSVAL_SHIFTED_TAG_INT32);
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_SPECIFIC_BOOLEAN(jsval_layout l, JSBool b)
 {
     return l.asBits == (((uint64_t)(uint32_t)b) | JSVAL_SHIFTED_TAG_BOOLEAN);
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout
+static inline jsval_layout
 MAGIC_TO_JSVAL_IMPL(JSWhyMagic why)
 {
     jsval_layout l;
     l.asBits = ((uint64_t)(uint32_t)why) | JSVAL_SHIFTED_TAG_MAGIC;
     return l;
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_SAME_TYPE_IMPL(jsval_layout lhs, jsval_layout rhs)
 {
     uint64_t lbits = lhs.asBits, rbits = rhs.asBits;
     return (lbits <= JSVAL_SHIFTED_TAG_MAX_DOUBLE && rbits <= JSVAL_SHIFTED_TAG_MAX_DOUBLE) ||
            (((lbits ^ rbits) & 0xFFFF800000000000LL) == 0);
 }
 
-static MOZ_ALWAYS_INLINE JSValueType
+static inline JSValueType
 JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(jsval_layout l)
 {
    uint64_t type = (l.asBits >> JSVAL_TAG_SHIFT) & 0xF;
    MOZ_ASSERT(type > JSVAL_TYPE_DOUBLE);
    return (JSValueType)type;
 }
 
 #endif  /* JS_BITS_PER_WORD */
 
-static MOZ_ALWAYS_INLINE double
+static inline double
 JS_CANONICALIZE_NAN(double d)
 {
     if (MOZ_UNLIKELY(d != d)) {
         jsval_layout l;
         l.asBits = 0x7FF8000000000000LL;
         return l.asDouble;
     }
     return d;
 }
 
-static MOZ_ALWAYS_INLINE jsval_layout JSVAL_TO_IMPL(JS::Value v);
-static MOZ_ALWAYS_INLINE JS::Value IMPL_TO_JSVAL(jsval_layout l);
+static inline jsval_layout JSVAL_TO_IMPL(JS::Value v);
+static inline JS::Value IMPL_TO_JSVAL(jsval_layout l);
 
 namespace JS {
 
 /*
  * JS::Value is the interface for a single JavaScript Engine value.  A few
  * general notes on JS::Value:
  *
  * - JS::Value has setX() and isX() members for X in
@@ -859,341 +859,287 @@ class Value
   public:
     /*
      * N.B. the default constructor leaves Value unitialized. Adding a default
      * constructor prevents Value from being stored in a union.
      */
 
     /*** Mutators ***/
 
-    MOZ_ALWAYS_INLINE
     void setNull() {
         data.asBits = BUILD_JSVAL(JSVAL_TAG_NULL, 0).asBits;
     }
 
-    MOZ_ALWAYS_INLINE
     void setUndefined() {
         data.asBits = BUILD_JSVAL(JSVAL_TAG_UNDEFINED, 0).asBits;
     }
 
-    MOZ_ALWAYS_INLINE
     void setInt32(int32_t i) {
         data = INT32_TO_JSVAL_IMPL(i);
     }
 
-    MOZ_ALWAYS_INLINE
     int32_t &getInt32Ref() {
         MOZ_ASSERT(isInt32());
         return data.s.payload.i32;
     }
 
-    MOZ_ALWAYS_INLINE
     void setDouble(double d) {
         data = DOUBLE_TO_JSVAL_IMPL(d);
     }
 
-    MOZ_ALWAYS_INLINE
     double &getDoubleRef() {
         MOZ_ASSERT(isDouble());
         return data.asDouble;
     }
 
-    MOZ_ALWAYS_INLINE
     void setString(JSString *str) {
         MOZ_ASSERT(!IsPoisonedPtr(str));
         data = STRING_TO_JSVAL_IMPL(str);
     }
 
-    MOZ_ALWAYS_INLINE
     void setString(const JS::Anchor<JSString *> &str) {
         setString(str.get());
     }
 
-    MOZ_ALWAYS_INLINE
     void setObject(JSObject &obj) {
         MOZ_ASSERT(!IsPoisonedPtr(&obj));
         data = OBJECT_TO_JSVAL_IMPL(&obj);
     }
 
-    MOZ_ALWAYS_INLINE
     void setBoolean(bool b) {
         data = BOOLEAN_TO_JSVAL_IMPL(b);
     }
 
-    MOZ_ALWAYS_INLINE
     void setMagic(JSWhyMagic why) {
         data = MAGIC_TO_JSVAL_IMPL(why);
     }
 
-    MOZ_ALWAYS_INLINE
     bool setNumber(uint32_t ui) {
         if (ui > JSVAL_INT_MAX) {
             setDouble((double)ui);
             return false;
         } else {
             setInt32((int32_t)ui);
             return true;
         }
     }
 
-    MOZ_ALWAYS_INLINE
     bool setNumber(double d) {
         int32_t i;
         if (MOZ_DOUBLE_IS_INT32(d, &i)) {
             setInt32(i);
             return true;
         } else {
             setDouble(d);
             return false;
         }
     }
 
-    MOZ_ALWAYS_INLINE
     void setObjectOrNull(JSObject *arg) {
         if (arg)
             setObject(*arg);
         else
             setNull();
     }
 
-    MOZ_ALWAYS_INLINE
     void swap(Value &rhs) {
         uint64_t tmp = rhs.data.asBits;
         rhs.data.asBits = data.asBits;
         data.asBits = tmp;
     }
 
     /*** Value type queries ***/
 
-    MOZ_ALWAYS_INLINE
     bool isUndefined() const {
         return JSVAL_IS_UNDEFINED_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isNull() const {
         return JSVAL_IS_NULL_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isNullOrUndefined() const {
         return isNull() || isUndefined();
     }
 
-    MOZ_ALWAYS_INLINE
     bool isInt32() const {
         return JSVAL_IS_INT32_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isInt32(int32_t i32) const {
         return JSVAL_IS_SPECIFIC_INT32_IMPL(data, i32);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isDouble() const {
         return JSVAL_IS_DOUBLE_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isNumber() const {
         return JSVAL_IS_NUMBER_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isString() const {
         return JSVAL_IS_STRING_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isObject() const {
         return JSVAL_IS_OBJECT_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isPrimitive() const {
         return JSVAL_IS_PRIMITIVE_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isObjectOrNull() const {
         return JSVAL_IS_OBJECT_OR_NULL_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isGCThing() const {
         return JSVAL_IS_GCTHING_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isBoolean() const {
         return JSVAL_IS_BOOLEAN_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isTrue() const {
         return JSVAL_IS_SPECIFIC_BOOLEAN(data, true);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isFalse() const {
         return JSVAL_IS_SPECIFIC_BOOLEAN(data, false);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isMagic() const {
         return JSVAL_IS_MAGIC_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isMagic(JSWhyMagic why) const {
         MOZ_ASSERT_IF(isMagic(), data.s.payload.why == why);
         return JSVAL_IS_MAGIC_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool isMarkable() const {
         return JSVAL_IS_TRACEABLE_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     JSGCTraceKind gcKind() const {
         MOZ_ASSERT(isMarkable());
         return JSGCTraceKind(JSVAL_TRACE_KIND_IMPL(data));
     }
 
-    MOZ_ALWAYS_INLINE
     JSWhyMagic whyMagic() const {
         MOZ_ASSERT(isMagic());
         return data.s.payload.why;
     }
 
     /*** Comparison ***/
 
-    MOZ_ALWAYS_INLINE
     bool operator==(const Value &rhs) const {
         return data.asBits == rhs.data.asBits;
     }
 
-    MOZ_ALWAYS_INLINE
     bool operator!=(const Value &rhs) const {
         return data.asBits != rhs.data.asBits;
     }
 
     friend inline bool SameType(const Value &lhs, const Value &rhs);
 
     /*** Extract the value's typed payload ***/
 
-    MOZ_ALWAYS_INLINE
     int32_t toInt32() const {
         MOZ_ASSERT(isInt32());
         return JSVAL_TO_INT32_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     double toDouble() const {
         MOZ_ASSERT(isDouble());
         return data.asDouble;
     }
 
-    MOZ_ALWAYS_INLINE
     double toNumber() const {
         MOZ_ASSERT(isNumber());
         return isDouble() ? toDouble() : double(toInt32());
     }
 
-    MOZ_ALWAYS_INLINE
     JSString *toString() const {
         MOZ_ASSERT(isString());
         return JSVAL_TO_STRING_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     JSObject &toObject() const {
         MOZ_ASSERT(isObject());
         return *JSVAL_TO_OBJECT_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     JSObject *toObjectOrNull() const {
         MOZ_ASSERT(isObjectOrNull());
         return JSVAL_TO_OBJECT_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     void *toGCThing() const {
         MOZ_ASSERT(isGCThing());
         return JSVAL_TO_GCTHING_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     bool toBoolean() const {
         MOZ_ASSERT(isBoolean());
         return JSVAL_TO_BOOLEAN_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     uint32_t payloadAsRawUint32() const {
         MOZ_ASSERT(!isDouble());
         return data.s.payload.u32;
     }
 
-    MOZ_ALWAYS_INLINE
     uint64_t asRawBits() const {
         return data.asBits;
     }
 
-    MOZ_ALWAYS_INLINE
     JSValueType extractNonDoubleType() const {
         return JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(data);
     }
 
     /*
      * Private API
      *
      * Private setters/getters allow the caller to read/write arbitrary types
      * that fit in the 64-bit payload. It is the caller's responsibility, after
      * storing to a value with setPrivateX to read only using getPrivateX.
      * Privates values are given a type type which ensures they are not marked.
      */
 
-    MOZ_ALWAYS_INLINE
     void setPrivate(void *ptr) {
         data = PRIVATE_PTR_TO_JSVAL_IMPL(ptr);
     }
 
-    MOZ_ALWAYS_INLINE
     void *toPrivate() const {
         MOZ_ASSERT(JSVAL_IS_DOUBLE_IMPL(data));
         return JSVAL_TO_PRIVATE_PTR_IMPL(data);
     }
 
-    MOZ_ALWAYS_INLINE
     void setPrivateUint32(uint32_t ui) {
         MOZ_ASSERT(uint32_t(int32_t(ui)) == ui);
         setInt32(int32_t(ui));
     }
 
-    MOZ_ALWAYS_INLINE
     uint32_t toPrivateUint32() const {
         return uint32_t(toInt32());
     }
 
     /*
      * An unmarked value is just a void* cast as a Value. Thus, the Value is
      * not safe for GC and must not be marked. This API avoids raw casts
      * and the ensuing strict-aliasing warnings.
      */
 
-    MOZ_ALWAYS_INLINE
     void setUnmarkedPtr(void *ptr) {
         data.asPtr = ptr;
     }
 
-    MOZ_ALWAYS_INLINE
     void *toUnmarkedPtr() const {
         return data.asPtr;
     }
 
     const size_t *payloadWord() const {
 #if JS_BITS_PER_WORD == 32
         return &data.s.payload.word;
 #elif JS_BITS_PER_WORD == 64
@@ -1238,135 +1184,135 @@ IsPoisonedValue(const Value &v)
         return IsPoisonedPtr(v.toString());
     if (v.isObject())
         return IsPoisonedPtr(&v.toObject());
     return false;
 }
 
 /************************************************************************/
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NullValue()
 {
     Value v;
     v.setNull();
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 UndefinedValue()
 {
     Value v;
     v.setUndefined();
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 Int32Value(int32_t i32)
 {
     Value v;
     v.setInt32(i32);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 DoubleValue(double dbl)
 {
     Value v;
     v.setDouble(dbl);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 StringValue(JSString *str)
 {
     Value v;
     v.setString(str);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 BooleanValue(bool boo)
 {
     Value v;
     v.setBoolean(boo);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 ObjectValue(JSObject &obj)
 {
     Value v;
     v.setObject(obj);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 ObjectValueCrashOnTouch()
 {
     Value v;
     v.setObject(*reinterpret_cast<JSObject *>(0x42));
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 MagicValue(JSWhyMagic why)
 {
     Value v;
     v.setMagic(why);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(float f)
 {
     Value v;
     v.setNumber(f);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(double dbl)
 {
     Value v;
     v.setNumber(dbl);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(int8_t i)
 {
     return Int32Value(i);
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(uint8_t i)
 {
     return Int32Value(i);
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(int16_t i)
 {
     return Int32Value(i);
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(uint16_t i)
 {
     return Int32Value(i);
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(int32_t i)
 {
     return Int32Value(i);
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(uint32_t i)
 {
     Value v;
     v.setNumber(i);
     return v;
 }
 
 namespace detail {
@@ -1401,48 +1347,48 @@ class MakeNumberValue<false>
             v.setDouble(double(t));
         return v;
     }
 };
 
 } // namespace detail
 
 template <typename T>
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 NumberValue(const T t)
 {
     MOZ_ASSERT(T(double(t)) == t, "value creation would be lossy");
     return detail::MakeNumberValue<std::numeric_limits<T>::is_signed>::create(t);
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 ObjectOrNullValue(JSObject *obj)
 {
     Value v;
     v.setObjectOrNull(obj);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 PrivateValue(void *ptr)
 {
     Value v;
     v.setPrivate(ptr);
     return v;
 }
 
-static MOZ_ALWAYS_INLINE Value
+static inline Value
 PrivateUint32Value(uint32_t ui)
 {
     Value v;
     v.setPrivateUint32(ui);
     return v;
 }
 
-MOZ_ALWAYS_INLINE bool
+inline bool
 SameType(const Value &lhs, const Value &rhs)
 {
     return JSVAL_SAME_TYPE_IMPL(lhs.data, rhs.data);
 }
 
 } // namespace JS
 
 /************************************************************************/
@@ -1583,23 +1529,23 @@ class RootedBase<JS::Value> : public Mut
     friend class MutableValueOperations<Rooted<JS::Value> >;
     JS::Value * extractMutable() {
         return static_cast<Rooted<JS::Value>*>(this)->address();
     }
 };
 
 } // namespace js
 
-MOZ_ALWAYS_INLINE jsval_layout
+inline jsval_layout
 JSVAL_TO_IMPL(JS::Value v)
 {
     return v.data;
 }
 
-MOZ_ALWAYS_INLINE JS::Value
+inline JS::Value
 IMPL_TO_JSVAL(jsval_layout l)
 {
     JS::Value v;
     v.data = l;
     return v;
 }
 
 namespace JS {
@@ -1647,173 +1593,173 @@ MOZ_STATIC_ASSERT(sizeof(LayoutAlignment
  */
 typedef JS::Value jsval;
 
 MOZ_STATIC_ASSERT(sizeof(jsval_layout) == sizeof(JS::Value),
                   "jsval_layout and JS::Value must have identical layouts");
 
 /************************************************************************/
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_NULL(jsval v)
 {
     return JSVAL_IS_NULL_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_VOID(jsval v)
 {
     return JSVAL_IS_UNDEFINED_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_INT(jsval v)
 {
     return JSVAL_IS_INT32_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE int32_t
+static inline int32_t
 JSVAL_TO_INT(jsval v)
 {
     MOZ_ASSERT(JSVAL_IS_INT(v));
     return JSVAL_TO_INT32_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE jsval
+static inline jsval
 INT_TO_JSVAL(int32_t i)
 {
     return IMPL_TO_JSVAL(INT32_TO_JSVAL_IMPL(i));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_DOUBLE(jsval v)
 {
     return JSVAL_IS_DOUBLE_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE double
+static inline double
 JSVAL_TO_DOUBLE(jsval v)
 {
     jsval_layout l;
     MOZ_ASSERT(JSVAL_IS_DOUBLE(v));
     l = JSVAL_TO_IMPL(v);
     return l.asDouble;
 }
 
-static MOZ_ALWAYS_INLINE jsval
+static inline jsval
 DOUBLE_TO_JSVAL(double d)
 {
     /*
      * This is a manually inlined version of:
      *    d = JS_CANONICALIZE_NAN(d);
      *    return IMPL_TO_JSVAL(DOUBLE_TO_JSVAL_IMPL(d));
      * because GCC from XCode 3.1.4 miscompiles the above code.
      */
     jsval_layout l;
     if (MOZ_UNLIKELY(d != d))
         l.asBits = 0x7FF8000000000000LL;
     else
         l.asDouble = d;
     return IMPL_TO_JSVAL(l);
 }
 
-static MOZ_ALWAYS_INLINE jsval
+static inline jsval
 UINT_TO_JSVAL(uint32_t i)
 {
     if (i <= JSVAL_INT_MAX)
         return INT_TO_JSVAL((int32_t)i);
     return DOUBLE_TO_JSVAL((double)i);
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_NUMBER(jsval v)
 {
     return JSVAL_IS_NUMBER_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_STRING(jsval v)
 {
     return JSVAL_IS_STRING_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE JSString *
+static inline JSString *
 JSVAL_TO_STRING(jsval v)
 {
     MOZ_ASSERT(JSVAL_IS_STRING(v));
     return JSVAL_TO_STRING_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE jsval
+static inline jsval
 STRING_TO_JSVAL(JSString *str)
 {
     return IMPL_TO_JSVAL(STRING_TO_JSVAL_IMPL(str));
 }
 
-static MOZ_ALWAYS_INLINE JSObject *
+static inline JSObject *
 JSVAL_TO_OBJECT(jsval v)
 {
     MOZ_ASSERT(JSVAL_IS_OBJECT_OR_NULL_IMPL(JSVAL_TO_IMPL(v)));
     return JSVAL_TO_OBJECT_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE jsval
+static inline jsval
 OBJECT_TO_JSVAL(JSObject *obj)
 {
     if (obj)
         return IMPL_TO_JSVAL(OBJECT_TO_JSVAL_IMPL(obj));
     return IMPL_TO_JSVAL(BUILD_JSVAL(JSVAL_TAG_NULL, 0));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_BOOLEAN(jsval v)
 {
     return JSVAL_IS_BOOLEAN_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_TO_BOOLEAN(jsval v)
 {
     MOZ_ASSERT(JSVAL_IS_BOOLEAN(v));
     return JSVAL_TO_BOOLEAN_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE jsval
+static inline jsval
 BOOLEAN_TO_JSVAL(JSBool b)
 {
     return IMPL_TO_JSVAL(BOOLEAN_TO_JSVAL_IMPL(b));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_PRIMITIVE(jsval v)
 {
     return JSVAL_IS_PRIMITIVE_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE JSBool
+static inline JSBool
 JSVAL_IS_GCTHING(jsval v)
 {
     return JSVAL_IS_GCTHING_IMPL(JSVAL_TO_IMPL(v));
 }
 
-static MOZ_ALWAYS_INLINE void *
+static inline void *
 JSVAL_TO_GCTHING(jsval v)
 {
     MOZ_ASSERT(JSVAL_IS_GCTHING(v));
     return JSVAL_TO_GCTHING_IMPL(JSVAL_TO_IMPL(v));
 }
 
 /* To be GC-safe, privates are tagged as doubles. */
 
-static MOZ_ALWAYS_INLINE jsval
+static inline jsval
 PRIVATE_TO_JSVAL(void *ptr)
 {
     return IMPL_TO_JSVAL(PRIVATE_PTR_TO_JSVAL_IMPL(ptr));
 }
 
-static MOZ_ALWAYS_INLINE void *
+static inline void *
 JSVAL_TO_PRIVATE(jsval v)
 {
     MOZ_ASSERT(JSVAL_IS_DOUBLE(v));
     return JSVAL_TO_PRIVATE_PTR_IMPL(JSVAL_TO_IMPL(v));
 }
 
 #endif /* js_Value_h___ */