You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Integer-Indexed exotic object (IIEO) is an object that behaves as if it had internal methods as specified in 9.4.5 Integer-Indexed Exotic Objects.
A TypedArray instance aka TypedArray object (TAO) is presumably an object that was created via one of the TypedArray constructors. And every TypedArray constructor creates the resulting TAO via a call to AllocateTypedArray(), which calls IntegerIndexedObjectCreate(), which underlines that every TAO is an IIEO.
Is the converse true? Is every IIEO a TAO, or are there non-TAO IIEOs? The spec doesn't define any (the spec's only call to IntegerIndexedObjectCreate is in AllocateTypedArray), but presumably an implementation could define such a thing. However, I'm having trouble imagining it, given that every IIEO must have a [[TypedArrayName]] internal slot, whose value must be a constructor name in Table 60 (see 9.4.5.8 IntegerIndexedElementGet). That is, it seems like a non-TAO IIEO would look a lot like a TAO IIEO.
For some perspective, consider an analogous situation for arrays. Conceivably, the spec could have one term for any object whose internal methods conform to 9.4.2 Array Exotic Objects, and a distinct term for any object created by 22.1.1 The Array constructor, leaving room for an implementation to define a 9.4.2-array that isn't a 22.1.1-array. But it doesn't make that distinction. So why does it make the analogous distinction for IIEO/TAO?
The text was updated successfully, but these errors were encountered:
If there's no rationale for the distinction, I think we could just replace occurrences of "Integer-Indexed exotic object" with "TypedArray exotic object" (and similarly in the 3 IntegerIndexed operation names).
22.2.7 Properties of TypedArray Instances tells us that "TypedArray instances are Integer-Indexed exotic objects."
An Integer-Indexed exotic object (IIEO) is an object that behaves as if it had internal methods as specified in 9.4.5 Integer-Indexed Exotic Objects.
A TypedArray instance aka TypedArray object (TAO) is presumably an object that was created via one of the TypedArray constructors. And every TypedArray constructor creates the resulting TAO via a call to AllocateTypedArray(), which calls IntegerIndexedObjectCreate(), which underlines that every TAO is an IIEO.
Is the converse true? Is every IIEO a TAO, or are there non-TAO IIEOs? The spec doesn't define any (the spec's only call to IntegerIndexedObjectCreate is in AllocateTypedArray), but presumably an implementation could define such a thing. However, I'm having trouble imagining it, given that every IIEO must have a [[TypedArrayName]] internal slot, whose value must be a constructor name in Table 60 (see 9.4.5.8 IntegerIndexedElementGet). That is, it seems like a non-TAO IIEO would look a lot like a TAO IIEO.
For some perspective, consider an analogous situation for arrays. Conceivably, the spec could have one term for any object whose internal methods conform to 9.4.2 Array Exotic Objects, and a distinct term for any object created by 22.1.1 The Array constructor, leaving room for an implementation to define a 9.4.2-array that isn't a 22.1.1-array. But it doesn't make that distinction. So why does it make the analogous distinction for IIEO/TAO?
The text was updated successfully, but these errors were encountered: