bad-range.js |
---
esid: sec-atomics.compareexchange
description: >
Test range checking of Atomics.compareExchange on arrays that allow atomic operations
includes: [testAtomics.js, testTypedArray.js]
features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray]
--- |
1145 |
bigint |
|
|
browser.js |
|
0 |
descriptor.js |
---
esid: sec-atomics.compareexchange
description: Testing descriptor property of Atomics.compareExchange
includes: [propertyHelper.js]
features: [Atomics]
--- |
525 |
expected-return-value.js |
---
esid: sec-atomics.compareExchange
description: >
Atomics.compareExchange returns the value that existed at the
index prior to the operation.
info: |
Atomics.compareExchange( typedArray, index, expectedValue, replacementValue )
...
12. Let compareExchange denote a semantic function of two List of
byte values arguments that returns the second argument if the
first argument is element-wise equal to expectedBytes.
13. Return GetModifySetValueInBuffer(buffer, indexedPosition,
elementType, replacement, compareExchange).
GetModifySetValueInBuffer( arrayBuffer,
byteIndex, type, value, op [ , isLittleEndian ] )
...
16. Return RawBytesToNumber(type, rawBytesRead, isLittleEndian).
features: [Atomics, SharedArrayBuffer, TypedArray]
--- |
1659 |
good-views.js |
---
esid: sec-atomics.compareexchange
description: Test Atomics.compareExchange on arrays that allow atomic operations.
includes: [testAtomics.js, testTypedArray.js]
features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray]
--- |
3046 |
length.js |
---
esid: sec-atomics.compareexchange
description: >
Atomics.compareExchange.length is 4.
info: |
Atomics.compareExchange ( ia, index, expect, replace )
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form “...name”
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
features: [Atomics]
--- |
1304 |
name.js |
---
esid: sec-atomics.compareexchange
description: >
Atomics.compareExchange.name is "compareExchange".
includes: [propertyHelper.js]
features: [Atomics]
--- |
622 |
non-shared-bufferdata.js |
---
esid: sec-atomics.compareExchange
description: >
Atomics.compareExchange will operate on TA when TA.buffer is not a SharedArrayBuffer
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, TypedArray]
--- |
835 |
non-shared-int-views-throws.js |
---
esid: sec-atomics.compareExchange
description: >
Atomics.compareExchange throws when operating on non-sharable integer TypedArrays
includes: [testTypedArray.js]
features: [ArrayBuffer, Atomics, TypedArray]
--- |
823 |
non-views.js |
---
esid: sec-atomics.compareexchange
description: >
Test Atomics.compareExchange on view values other than TypedArrays
includes: [testAtomics.js]
features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray]
--- |
826 |
not-a-constructor.js |
---
esid: sec-ecmascript-standard-built-in-objects
description: >
Atomics.compareExchange does not implement [[Construct]], is not new-able
info: |
ECMAScript Function Objects
Built-in function objects that are not identified as constructors do not
implement the [[Construct]] internal method unless otherwise specified in
the description of a particular function.
sec-evaluatenew
...
7. If IsConstructor(constructor) is false, throw a TypeError exception.
...
includes: [isConstructor.js]
features: [Reflect.construct, Atomics, arrow-function, TypedArray, SharedArrayBuffer]
--- |
1316 |
shell.js |
---
description: |
Test if a given function is a constructor function.
defines: [isConstructor]
features: [Reflect.construct]
--- |
596 |
validate-arraytype-before-expectedValue-coercion.js |
---
esid: sec-atomics.compareExchange
description: >
TypedArray type is validated before `expectedValue` argument is coerced.
info: |
24.4.4 Atomics.compareExchange ( typedArray, index, expectedValue, replacementValue )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray).
...
24.4.1.1 ValidateSharedIntegerTypedArray ( typedArray [ , onlyInt32 ] )
...
4. Let typeName be typedArray.[[TypedArrayName]].
5. If onlyInt32 is true, then
a. If typeName is not "Int32Array", throw a TypeError exception.
6. Else,
a. If typeName is not "Int8Array", "Uint8Array", "Int16Array", "Uint16Array", "Int32Array",
or "Uint32Array", throw a TypeError exception.
...
includes: [testTypedArray.js]
features: [Atomics, TypedArray]
--- |
1412 |
validate-arraytype-before-index-coercion.js |
---
esid: sec-atomics.compareExchange
description: >
TypedArray type is validated before `index` argument is coerced.
info: |
24.4.4 Atomics.compareExchange ( typedArray, index, expectedValue, replacementValue )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray).
...
24.4.1.1 ValidateSharedIntegerTypedArray ( typedArray [ , onlyInt32 ] )
...
4. Let typeName be typedArray.[[TypedArrayName]].
5. If onlyInt32 is true, then
a. If typeName is not "Int32Array", throw a TypeError exception.
6. Else,
a. If typeName is not "Int8Array", "Uint8Array", "Int16Array", "Uint16Array", "Int32Array",
or "Uint32Array", throw a TypeError exception.
...
includes: [testTypedArray.js]
features: [Atomics, TypedArray]
--- |
1380 |
validate-arraytype-before-replacementValue-coercion.js |
---
esid: sec-atomics.compareExchange
description: >
TypedArray type is validated before `replacementValue` argument is coerced.
info: |
24.4.4 Atomics.compareExchange ( typedArray, index, expectedValue, replacementValue )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray).
...
24.4.1.1 ValidateSharedIntegerTypedArray ( typedArray [ , onlyInt32 ] )
...
4. Let typeName be typedArray.[[TypedArrayName]].
5. If onlyInt32 is true, then
a. If typeName is not "Int32Array", throw a TypeError exception.
6. Else,
a. If typeName is not "Int8Array", "Uint8Array", "Int16Array", "Uint16Array", "Int32Array",
or "Uint32Array", throw a TypeError exception.
...
includes: [testTypedArray.js]
features: [Atomics, TypedArray]
--- |
1424 |