bug 681884 - faster slow path of GC allocations. r=wmccloskey

This commit is contained in:
Igor Bukanov
2011-08-18 09:16:08 +02:00
parent ee9b538356
commit 734ef93837
25 changed files with 843 additions and 831 deletions

View File

@@ -1068,7 +1068,7 @@ JSObject::makeDenseArraySlow(JSContext *cx)
js::Shape *oldMap = lastProp;
/* Create a native scope. */
js::gc::FinalizeKind kind = js::gc::FinalizeKind(arenaHeader()->getThingKind());
gc::AllocKind kind = getAllocKind();
if (!InitScopeForObject(cx, this, &js_SlowArrayClass, getProto()->getNewType(cx), kind))
return false;
@@ -3256,7 +3256,7 @@ NewArray(JSContext *cx, jsuint length, JSObject *proto)
{
JS_ASSERT_IF(proto, proto->isArray());
gc::FinalizeKind kind = GuessObjectGCKind(length, true);
gc::AllocKind kind = GuessObjectGCKind(length, true);
JSObject *obj = detail::NewObject<WithProto::Class, false>(cx, &js_ArrayClass, proto, NULL, kind);
if (!obj)
return NULL;