Skip to content

Commit

Permalink
Editorial: Move getting the TA type inside the RMW function (tc39#3499)
Browse files Browse the repository at this point in the history
Fixes tc39#3117
  • Loading branch information
syg authored and ljharb committed Nov 26, 2024
1 parent cf5938e commit 3e6f71c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions esmeta-ignore.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"GetFunctionRealm",
"GetGlobalObject",
"GetViewByteLength",
"INTRINSICS.Atomics.add",
"INTRINSICS.Atomics.notify",
"INTRINSICS.Atomics.sub",
"InstallErrorCause",
"MakeMatchIndicesIndexPairArray",
"Record[BuiltinFunctionObject].Construct",
Expand Down
13 changes: 7 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -43341,6 +43341,7 @@ <h1>Notation</h1>
<p>To aid verifying that a read-modify-write modification function's algorithm steps constitute a pure, mathematical function, the following editorial conventions are recommended:</p>
<ul>
<li>They do not access, directly or transitively via invoked abstract operations and abstract closures, any language or specification values except their parameters and captured values.</li>
<li>They do not invoke, directly or transitively, abstract operations and abstract closures that return Completion Records.</li>
<li>They do not return Completion Records.</li>
</ul>
</emu-note>
Expand Down Expand Up @@ -45436,9 +45437,9 @@ <h1>
<h1>Atomics.add ( _typedArray_, _index_, _value_ )</h1>
<p>This function performs the following steps when called:</p>
<emu-alg>
1. Let _type_ be TypedArrayElementType(_typedArray_).
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
1. Let _add_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _type_ and _isLittleEndian_ and performs the following steps atomically when called:
1. Let _add_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _typedArray_ and performs the following steps atomically when called:
1. Let _type_ be TypedArrayElementType(_typedArray_).
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
1. Let _x_ be RawBytesToNumeric(_type_, _xBytes_, _isLittleEndian_).
1. Let _y_ be RawBytesToNumeric(_type_, _yBytes_, _isLittleEndian_).
1. If _x_ is a Number, then
Expand Down Expand Up @@ -45562,9 +45563,9 @@ <h1>Atomics.store ( _typedArray_, _index_, _value_ )</h1>
<h1>Atomics.sub ( _typedArray_, _index_, _value_ )</h1>
<p>This function performs the following steps when called:</p>
<emu-alg>
1. Let _type_ be TypedArrayElementType(_typedArray_).
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
1. Let _subtract_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _type_ and _isLittleEndian_ and performs the following steps atomically when called:
1. Let _subtract_ be a new read-modify-write modification function with parameters (_xBytes_, _yBytes_) that captures _typedArray_ and performs the following steps atomically when called:
1. Let _type_ be TypedArrayElementType(_typedArray_).
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
1. Let _x_ be RawBytesToNumeric(_type_, _xBytes_, _isLittleEndian_).
1. Let _y_ be RawBytesToNumeric(_type_, _yBytes_, _isLittleEndian_).
1. If _x_ is a Number, then
Expand Down

0 comments on commit 3e6f71c

Please sign in to comment.