Backed out changeset c03ebf340688. Bye-bye middle-deletes and their O(n^2) worst case complexity; hello dictionary-mode scopes (473228, r=jorendorff).

This commit is contained in:
Robert Sayre
2009-12-01 09:56:16 -05:00
parent bb8db4ed67
commit 6b5e0c1e3d
15 changed files with 718 additions and 903 deletions

View File

@@ -1327,8 +1327,8 @@ js_MakeArraySlow(JSContext *cx, JSObject *obj)
continue;
}
sprop = scope->addDataProperty(cx, id, JS_INITIAL_NSLOTS + i,
JSPROP_ENUMERATE);
sprop = scope->add(cx, id, NULL, NULL, i + JS_INITIAL_NSLOTS,
JSPROP_ENUMERATE, 0, 0);
if (!sprop)
goto out_bad;
}