mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-04 05:27:35 +09:00
Make use of ArrayObjects in favor of generic JS objects.
ArrayObjects has been a thing for years but been under-used. About time they are used where prudent.
This commit is contained in:
parent
1176a9ace1
commit
87f3c86484
14 changed files with 57 additions and 96 deletions
|
|
@ -774,7 +774,7 @@ GetValueTypeForTable(const Value& v)
|
|||
return type;
|
||||
}
|
||||
|
||||
/* static */ JSObject*
|
||||
/* static */ ArrayObject*
|
||||
ObjectGroup::newArrayObject(ExclusiveContext* cx,
|
||||
const Value* vp, size_t length,
|
||||
NewObjectKind newKind, NewArrayKind arrayKind)
|
||||
|
|
@ -854,11 +854,8 @@ ObjectGroup::newArrayObject(ExclusiveContext* cx,
|
|||
}
|
||||
|
||||
// The type of the elements being added will already be reflected in type
|
||||
// information, but make sure when creating an unboxed array that the
|
||||
// common element type is suitable for the unboxed representation.
|
||||
// information.
|
||||
ShouldUpdateTypes updateTypes = ShouldUpdateTypes::DontUpdate;
|
||||
if (!MaybeAnalyzeBeforeCreatingLargeArray(cx, group, vp, length))
|
||||
return nullptr;
|
||||
if (group->maybePreliminaryObjects())
|
||||
group->maybePreliminaryObjects()->maybeAnalyze(cx, group);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue