From e2cacdb2e49698f8f39c1c0ffc9611dd7067dafd Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sat, 15 Feb 2025 11:32:06 -0500 Subject: [PATCH 1/2] Editorial: Rename _use_ parameters to _accessMode_ Ref #30 --- spec.emu | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec.emu b/spec.emu index c3d88b7..b6bd925 100644 --- a/spec.emu +++ b/spec.emu @@ -342,16 +342,16 @@ contributors: Mark S. Miller, Richard Gibson ValidateTypedArray ( _O_: an ECMAScript language value, _order_: ~seq-cst~ or ~unordered~, - optional _use_: ~read~ or ~write~, + optional _accessMode_: ~read~ or ~write~, ): either a normal completion containing a TypedArray With Buffer Witness Record or a throw completion
- 1. If _use_ is not present, set _use_ to ~read~. + 1. If _accessMode_ is not present, set _accessMode_ to ~read~. 1. Perform ? RequireInternalSlot(_O_, [[TypedArrayName]]). 1. Assert: _O_ has a [[ViewedArrayBuffer]] internal slot. - 1. If _use_ is ~write~ and IsImmutableBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, throw a *TypeError* exception. + 1. If _accessMode_ is ~write~ and IsImmutableBuffer(_O_.[[ViewedArrayBuffer]]) is *true*, throw a *TypeError* exception. 1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_O_, _order_). 1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception. 1. Return _taRecord_. @@ -744,14 +744,14 @@ contributors: Mark S. Miller, Richard Gibson ValidateIntegerTypedArray ( _typedArray_: an ECMAScript language value, _waitable_: a Boolean, - optional _use_: ~read~ or ~write~, + optional _accessMode_: ~read~ or ~write~, ): either a normal completion containing a TypedArray With Buffer Witness Record, or a throw completion
- 1. If _use_ is not present, set _use_ to ~read~. - 1. Let _taRecord_ be ? ValidateTypedArray(_typedArray_, ~unordered~, _use_). + 1. If _accessMode_ is not present, set _accessMode_ to ~read~. + 1. Let _taRecord_ be ? ValidateTypedArray(_typedArray_, ~unordered~, _accessMode_). 1. NOTE: Bounds checking is not a synchronizing operation when _typedArray_'s backing buffer is a growable SharedArrayBuffer. 1. If _waitable_ is *true*, then 1. If _typedArray_.[[TypedArrayName]] is neither *"Int32Array"* nor *"BigInt64Array"*, throw a *TypeError* exception. @@ -768,15 +768,15 @@ contributors: Mark S. Miller, Richard Gibson _typedArray_: an ECMAScript language value, _requestIndex_: an ECMAScript language value, optional _waitable_: a Boolean, - optional _use_: ~read~ or ~write~, + optional _accessMode_: ~read~ or ~write~, ): either a normal completion containing an integer or a throw completion
1. If _waitable_ is not present, set _waitable_ to *false*. - 1. If _use_ is not present, set _use_ to ~read~. - 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, _waitable_, _use_). + 1. If _accessMode_ is not present, set _accessMode_ to ~read~. + 1. Let _taRecord_ be ? ValidateIntegerTypedArray(_typedArray_, _waitable_, _accessMode_). 1. Return ? ValidateAtomicAccess(_taRecord_, _requestIndex_). From 8ac7073f8a0d268ce680d896ca51cbcb93242652 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Sat, 15 Feb 2025 11:32:06 -0500 Subject: [PATCH 2/2] Editorial: Indicate the expected future change of AllocateArrayBuffer parameter _maxByteLength_ --- spec.emu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec.emu b/spec.emu index b6bd925..9731cfe 100644 --- a/spec.emu +++ b/spec.emu @@ -375,13 +375,14 @@ contributors: Mark S. Miller, Richard Gibson AllocateArrayBuffer ( _constructor_: a constructor, _byteLength_: a non-negative integer, - optional _maxByteLength_: a non-negative integer, or either ~empty~ or ~immutable~, + optional _maxByteLength_: a non-negative integer, or ~empty~ or either ~empty~ or ~immutable~, ): either a normal completion containing an ArrayBuffer or a throw completion
description
It is used to create an ArrayBuffer.
+ The current name and domain of parameter _maxByteLength_ is preserved for the benefit of diff readability, but both may be subject to change before acceptance into ECMA-262. 1. Let _slots_ be « [[ArrayBufferData]], [[ArrayBufferByteLength]], [[ArrayBufferDetachKey]] ». 1. If _maxByteLength_ is present and _maxByteLength_ is not ~empty~ an integer, let _allocatingResizableBuffer_ be *true*; otherwise let _allocatingResizableBuffer_ be *false*.