Bug 921543 - Remove OBJECT_FLAG_FUNCTION. r=bhackett

This commit is contained in:
Jan de Mooij 2013-09-28 14:26:05 +02:00
parent 23ce3971fb
commit ee910abc00
4 changed files with 7 additions and 10 deletions

View File

@ -195,7 +195,7 @@ IonBuilder::getPolyCallTargets(types::TemporaryTypeSet *calleeTypes, bool constr
} else {
types::TypeObject *typeObj = calleeTypes->getTypeObject(i);
JS_ASSERT(typeObj);
if (!typeObj->isFunction() || !typeObj->interpretedFunction) {
if (!typeObj->interpretedFunction) {
targets.clear();
return true;
}

View File

@ -1218,7 +1218,7 @@ TypeCompartment::newTypeObject(ExclusiveContext *cx, const Class *clasp, Handle<
sizeof(TypeObject), gc::TenuredHeap);
if (!object)
return NULL;
new(object) TypeObject(clasp, proto, clasp == &JSFunction::class_, unknown);
new(object) TypeObject(clasp, proto, unknown);
if (!cx->typeInferenceEnabled())
object->flags |= OBJECT_FLAG_UNKNOWN_MASK;

View File

@ -341,8 +341,9 @@ typedef uint32_t TypeFlags;
/* Flags and other state stored in TypeObject::flags */
enum {
/* Objects with this type are functions. */
OBJECT_FLAG_FUNCTION = 0x1,
/*
* UNUSED FLAG = 0x1,
*/
/* If set, addendum information should not be installed on this object. */
OBJECT_FLAG_ADDENDUM_CLEARED = 0x2,
@ -964,9 +965,7 @@ struct TypeObject : gc::BarrieredCell<TypeObject>
uint32_t padding;
#endif
inline TypeObject(const Class *clasp, TaggedProto proto, bool isFunction, bool unknown);
bool isFunction() { return !!(flags & OBJECT_FLAG_FUNCTION); }
inline TypeObject(const Class *clasp, TaggedProto proto, bool unknown);
bool hasAnyFlags(TypeObjectFlags flags) {
JS_ASSERT((flags & OBJECT_FLAG_DYNAMIC_MASK) == flags);

View File

@ -1363,7 +1363,7 @@ TypeSet::getObjectClass(unsigned i) const
// TypeObject
/////////////////////////////////////////////////////////////////////
inline TypeObject::TypeObject(const Class *clasp, TaggedProto proto, bool function, bool unknown)
inline TypeObject::TypeObject(const Class *clasp, TaggedProto proto, bool unknown)
{
mozilla::PodZero(this);
@ -1373,8 +1373,6 @@ inline TypeObject::TypeObject(const Class *clasp, TaggedProto proto, bool functi
this->clasp = clasp;
this->proto = proto.raw();
if (function)
flags |= OBJECT_FLAG_FUNCTION;
if (unknown)
flags |= OBJECT_FLAG_UNKNOWN_MASK;