Move JSObject::newType to a hashtable, bug 684410.

This commit is contained in:
Brian Hackett
2011-10-07 20:09:09 -07:00
parent 3757bb2b33
commit 43a6a0454e
19 changed files with 187 additions and 139 deletions

View File

@@ -1333,7 +1333,6 @@ JSObject::makeDenseArraySlow(JSContext *cx)
/* The initialized length is used iff this is a dense array. */
initializedLength = 0;
JS_ASSERT(newType == NULL);
/*
* Begin with the length property to share more of the property tree.
@@ -2681,7 +2680,7 @@ TryReuseArrayType(JSObject *obj, JSObject *nobj)
* and has the same prototype.
*/
JS_ASSERT(nobj->isDenseArray());
JS_ASSERT(nobj->type() == nobj->getProto()->newType);
JS_ASSERT(nobj->getProto()->hasNewType(nobj->type()));
if (obj->isArray() && !obj->hasSingletonType() && obj->getProto() == nobj->getProto())
nobj->setType(obj->type());