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

This commit is contained in:
Brendan Eich
2009-11-20 16:14:42 -08:00
parent 9d677a2595
commit bb8db4ed67
15 changed files with 906 additions and 721 deletions

View File

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