-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec Review #27
Comments
Thanks for the review!
I don't think I understand; we cannot make assertions about input that comes from ECMAScript code. Step 1.b.iv returns false (observably indicating lack of the requested effects) for attempts to change the configurability of a TypedArray index property—setting it to false on a mutable receiver [preexisting behavior] or to true on an immutable ArrayBuffer [new behavior]—and step 1.b.vii does likewise for attempts to change the writability. In both cases, we need to generalize from "can't set to false" to "can't change". But we could combine steps 1.b.ii and 1.b.iii into something like «If IsImmutableBuffer(O.[[ViewedArrayBuffer]]) is true, let mutable be false; else let mutable be true.».
I prefer instead to show that the same checks are being made (both for mutable vs. immutable here and for similarity with other [[DefineOwnProperty]]s, not to mention the preceding [[GetOwnProperty]]), just with different polarity. But this can be worked out as the proposal matures.
Correct.
It's following the precedent set by [[ArrayBufferMaxByteLength]], which could have been specified as present for all ArrayBuffer instances and set to undefined/EMPTY/etc. for fixed-length ones, but instead was specified as present only for resizable instances.
Removed in #28 as well, it was referring to the IsDetachedBuffer check but is shared with
The first is now gone; the second relates to strictness of nonsensical calls like |
To clarify on the first point, what i mean is, i don't like seeing "set [[Writable]] to mutable", i want to see hardcoded true or false in the descriptors so i don't have to think too hard about what values are being set there. |
#29. As with most other failing assignments, the thrown exceptions are limited to strict mode. |
mutable
in https://tc39.es/proposal-immutable-arraybuffer/#sec-typedarray-defineownproperty in steps iv and vii - it should be an editorial error if mutable is true and writable is also true, and assertions might be a clearer (albeit more verbose) way to ensure that correctness here.[[ArrayBufferIsImmutable]]
, why not a single slot with a boolean that's on every arraybuffer?The text was updated successfully, but these errors were encountered: