Bug 609248 - Move SameType outside js::Value as a workaround to gcc PR/38850. r=lw,a=shaver

This commit is contained in:
Mike Hommey 2010-11-07 09:20:51 +01:00
Родитель 918686a995
Коммит d3beed6075
1 изменённых файлов: 10 добавлений и 4 удалений

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

@ -566,10 +566,10 @@ class Value
return data.asBits != rhs.data.asBits;
}
JS_ALWAYS_INLINE
friend bool SameType(const Value &lhs, const Value &rhs) {
return JSVAL_SAME_TYPE_IMPL(lhs.data, rhs.data);
}
/* This function used to be inlined here, but this triggered a gcc bug
due to SameType being used in a template method.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38850 */
friend bool SameType(const Value &lhs, const Value &rhs);
/*** Extract the value's typed payload ***/
@ -740,6 +740,12 @@ class Value
jsval_layout data;
} JSVAL_ALIGNMENT;
JS_ALWAYS_INLINE bool
SameType(const Value &lhs, const Value &rhs)
{
return JSVAL_SAME_TYPE_IMPL(lhs.data, rhs.data);
}
static JS_ALWAYS_INLINE Value
NullValue()
{