Issue #2026 - Part 1 - Implement BigInt64 and BigUint64Array. https://bugzilla.mozilla.org/show_bug.cgi?id=1456569

This commit is contained in:
Brian Smith 2023-07-24 23:30:27 -05:00 committed by roytam1
commit b64643e410
36 changed files with 788 additions and 232 deletions

View file

@ -239,12 +239,15 @@ NativeObject::ensureDenseElements(ExclusiveContext* cx, uint32_t index, uint32_t
return DenseElementResult::Success;
}
inline Value
NativeObject::getDenseOrTypedArrayElement(uint32_t idx)
template <AllowGC allowGC>
inline bool
NativeObject::getDenseOrTypedArrayElement(ExclusiveContext* cx, uint32_t idx,
typename MaybeRooted<Value, allowGC>::MutableHandleType val)
{
if (is<TypedArrayObject>())
return as<TypedArrayObject>().getElement(idx);
return getDenseElement(idx);
return as<TypedArrayObject>().getElement<allowGC>(cx, idx, val);
val.set(getDenseElement(idx));
return true;
}
/* static */ inline NativeObject*