mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 748119 - Read barrier for js::types::Type (r=bhackett)
This commit is contained in:
parent
b915404490
commit
cc31724901
@ -107,10 +107,7 @@ class Type
|
||||
return data > JSVAL_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
TypeObjectKey *objectKey() const {
|
||||
JS_ASSERT(isObject());
|
||||
return (TypeObjectKey *) data;
|
||||
}
|
||||
inline TypeObjectKey *objectKey() const;
|
||||
|
||||
/* Accessors for JSObject types */
|
||||
|
||||
@ -118,10 +115,7 @@ class Type
|
||||
return isObject() && !!(data & 1);
|
||||
}
|
||||
|
||||
JSObject *singleObject() const {
|
||||
JS_ASSERT(isSingleObject());
|
||||
return (JSObject *) (data ^ 1);
|
||||
}
|
||||
inline JSObject *singleObject() const;
|
||||
|
||||
/* Accessors for TypeObject types */
|
||||
|
||||
@ -129,10 +123,7 @@ class Type
|
||||
return isObject() && !(data & 1);
|
||||
}
|
||||
|
||||
TypeObject *typeObject() const {
|
||||
JS_ASSERT(isTypeObject());
|
||||
return (TypeObject *) data;
|
||||
}
|
||||
inline TypeObject *typeObject() const;
|
||||
|
||||
bool operator == (Type o) const { return data == o.data; }
|
||||
bool operator != (Type o) const { return data != o.data; }
|
||||
|
@ -1014,6 +1014,33 @@ HashSetLookup(U **values, unsigned count, T key)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline TypeObjectKey *
|
||||
Type::objectKey() const
|
||||
{
|
||||
JS_ASSERT(isObject());
|
||||
if (isTypeObject())
|
||||
TypeObject::readBarrier((TypeObject *) data);
|
||||
else
|
||||
JSObject::readBarrier((JSObject *) (data ^ 1));
|
||||
return (TypeObjectKey *) data;
|
||||
}
|
||||
|
||||
inline JSObject *
|
||||
Type::singleObject() const
|
||||
{
|
||||
JS_ASSERT(isSingleObject());
|
||||
JSObject::readBarrier((JSObject *) (data ^ 1));
|
||||
return (JSObject *) (data ^ 1);
|
||||
}
|
||||
|
||||
inline TypeObject *
|
||||
Type::typeObject() const
|
||||
{
|
||||
JS_ASSERT(isTypeObject());
|
||||
TypeObject::readBarrier((TypeObject *) data);
|
||||
return (TypeObject *) data;
|
||||
}
|
||||
|
||||
inline bool
|
||||
TypeSet::hasType(Type type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user