[INFER] Introduce packed arrays, bug 604045.

This commit is contained in:
Brian Hackett
2010-11-05 07:37:09 -07:00
parent b0bfdfaca9
commit db1438df2f
39 changed files with 962 additions and 286 deletions

View File

@@ -288,9 +288,9 @@ EnumerateDenseArrayProperties(JSContext *cx, JSObject *obj, JSObject *pobj, uint
}
if (pobj->getArrayLength() > 0) {
size_t capacity = pobj->getDenseArrayCapacity();
size_t initlen = pobj->getDenseArrayInitializedLength();
Value *vp = pobj->getDenseArrayElements();
for (size_t i = 0; i < capacity; ++i, ++vp) {
for (size_t i = 0; i < initlen; ++i, ++vp) {
if (!vp->isMagic(JS_ARRAY_HOLE)) {
/* Dense arrays never get so large that i would not fit into an integer id. */
if (!Enumerate<EnumPolicy>(cx, obj, pobj, INT_TO_JSID(i), true, false, flags, ht, props))