trace |new Array|, via the magic of copy and paste

This commit is contained in:
2008-08-21 00:50:20 -07:00
parent e40b71b037
commit d65112e26b
5 changed files with 190 additions and 20 deletions

View File

@@ -611,6 +611,16 @@ js_FastEval(JSContext* cx, JSObject* eval, JSObject* obj, JSString *str)
return rval;
}
JSObject* FASTCALL
js_Array_1int(JSContext* cx, JSObject* ctor, jsint i)
{
JS_ASSERT(cx->gcDontBlock);
JSObject* obj = js_FastNewObject(cx, ctor);
if (obj)
obj->fslots[JSSLOT_ARRAY_LENGTH] = i;
return obj;
}
#define LO ARGSIZE_LO
#define F ARGSIZE_F
#define Q ARGSIZE_Q