Skip to content

Commit 3e6f71c

Browse files
sygljharb
authored andcommitted
Editorial: Move getting the TA type inside the RMW function (#3499)
Fixes #3117
1 parent cf5938e commit 3e6f71c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

esmeta-ignore.json

-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"GetFunctionRealm",
1010
"GetGlobalObject",
1111
"GetViewByteLength",
12-
"INTRINSICS.Atomics.add",
1312
"INTRINSICS.Atomics.notify",
14-
"INTRINSICS.Atomics.sub",
1513
"InstallErrorCause",
1614
"MakeMatchIndicesIndexPairArray",
1715
"Record[BuiltinFunctionObject].Construct",

spec.html

+7-6
Original file line numberDiff line numberDiff line change
@@ -43341,6 +43341,7 @@ <h1>Notation</h1>
4334143341
<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>
4334243342
<ul>
4334343343
<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>
43344+
<li>They do not invoke, directly or transitively, abstract operations and abstract closures that return Completion Records.</li>
4334443345
<li>They do not return Completion Records.</li>
4334543346
</ul>
4334643347
</emu-note>
@@ -45436,9 +45437,9 @@ <h1>
4543645437
<h1>Atomics.add ( _typedArray_, _index_, _value_ )</h1>
4543745438
<p>This function performs the following steps when called:</p>
4543845439
<emu-alg>
45439-
1. Let _type_ be TypedArrayElementType(_typedArray_).
45440-
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
45441-
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:
45440+
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:
45441+
1. Let _type_ be TypedArrayElementType(_typedArray_).
45442+
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
4544245443
1. Let _x_ be RawBytesToNumeric(_type_, _xBytes_, _isLittleEndian_).
4544345444
1. Let _y_ be RawBytesToNumeric(_type_, _yBytes_, _isLittleEndian_).
4544445445
1. If _x_ is a Number, then
@@ -45562,9 +45563,9 @@ <h1>Atomics.store ( _typedArray_, _index_, _value_ )</h1>
4556245563
<h1>Atomics.sub ( _typedArray_, _index_, _value_ )</h1>
4556345564
<p>This function performs the following steps when called:</p>
4556445565
<emu-alg>
45565-
1. Let _type_ be TypedArrayElementType(_typedArray_).
45566-
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
45567-
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:
45566+
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:
45567+
1. Let _type_ be TypedArrayElementType(_typedArray_).
45568+
1. Let _isLittleEndian_ be the value of the [[LittleEndian]] field of the surrounding agent's Agent Record.
4556845569
1. Let _x_ be RawBytesToNumeric(_type_, _xBytes_, _isLittleEndian_).
4556945570
1. Let _y_ be RawBytesToNumeric(_type_, _yBytes_, _isLittleEndian_).
4557045571
1. If _x_ is a Number, then

0 commit comments

Comments
 (0)