Are the TypedArray constructors missing [[CreateAction]] internal slots?
The individual typed array constructors are supposed to inherit their [[CreateAction]] from %TypedArray% and use the definition provided in people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-%typedarray%-intrinsic-object . I probably need to be more explicit about this in people.mozilla.org/~jorendorff/es6-draft.html#sec
Yeah, definitely this needs to be more explicit, in light of §6.1.7.2 Object Internal Methods and Internal Slots: "Internal slots are not object properties and they are not inherited."
Jeff Walden wrote:
Yeah, definitely this needs to be more explicit,
No need for "more" there :-P.
in light of §6.1.7.2 Object Internal Methods and Internal Slots: "Internal slots are not object properties and they are not inherited."
Definitely -- we talked at the last f2f about [[CreateAction]] being copied down unless overridden, so it was always own. Inheritance by copying, Crockford's "Swiss inheritance".
Yrs, and for ECMAScript functions this is specified in people.mozilla.org/~jorendorff/es6-draft.html#sec-makeconstructor . But the build-in constructors are not necessarily implemented as ECMAScript functions, so we need to be explicit about this in there specification. It’s just sometime I missed the first time through for the typed array constructors.
No prob -- thanks to Waldo for catching.
I was just tracing through typed array construction behavior, and it looks to me like |new Uint8Array()| creates an object via OrdinaryCreateFromConstructor, not by delegating to %TypedArray%.[[CreateAction]]. This creates an object with the right prototype chain but none of a typed array's internal slots. Error and NativeError seem to have [[CreateAction]] slots both; I'd have thought the typed array system would have similar structure.
Or am I missing something here? I'm just off a cross-country flight following a weekend with very erratic sleep hours, so I don't have much confidence in my reading being fully on-target.