Inline combined methods for NativeObject and UnboxedArrayObject accesses.

This commit is contained in:
wolfbeast 2019-06-10 16:49:47 +00:00 committed by Roy Tam
commit 1176a9ace1
9 changed files with 115 additions and 224 deletions

View file

@ -339,7 +339,7 @@ ArrayPopDense(JSContext* cx, HandleObject obj, MutableHandleValue rval)
bool
ArrayPushDense(JSContext* cx, HandleObject obj, HandleValue v, uint32_t* length)
{
*length = GetAnyBoxedOrUnboxedArrayLength(obj);
*length = obj->as<ArrayObject>().length();
DenseElementResult result =
SetOrExtendBoxedOrUnboxedDenseElements(cx, obj, *length, v.address(), 1,
ShouldUpdateTypes::DontUpdate);