bad-range.js |
---
esid: sec-atomics.wait
description: >
Test range checking of Atomics.wait on arrays that allow atomic operations
info: |
Atomics.wait( typedArray, index, value, timeout )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
...
includes: [testAtomics.js]
features: [ArrayBuffer, Atomics, BigInt, DataView, SharedArrayBuffer, Symbol, TypedArray]
--- |
1069 |
browser.js |
|
0 |
cannot-suspend-throws.js |
---
esid: sec-atomics.wait
description: >
Atomics.wait throws if agent cannot be suspended, CanBlock is false
info: |
Assuming [[CanBlock]] is false for the main host.
Atomics.wait( typedArray, index, value, timeout )
... (after args validation)
6. Let B be AgentCanSuspend().
7. If B is false, throw a TypeError exception.
...
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
flags: [CanBlockIsFalse]
--- |
1088 |
false-for-timeout-agent.js |
---
esid: sec-atomics.wait
description: >
False timeout arg should result in an +0 timeout
info: |
Atomics.wait( typedArray, index, value, timeout )
4. Let q be ? ToNumber(timeout).
Boolean -> If argument is true, return 1. If argument is false, return +0.
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
2125 |
false-for-timeout.js |
---
esid: sec-atomics.wait
description: >
False timeout arg should result in an +0 timeout
info: |
Atomics.wait( typedArray, index, value, timeout )
4. Let q be ? ToNumber(timeout).
Boolean -> If argument is true, return 1. If argument is false, return +0.
features: [Atomics, BigInt, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray]
flags: [CanBlockIsTrue]
--- |
1534 |
nan-for-timeout.js |
---
esid: sec-atomics.wait
description: >
NaN timeout arg should result in an infinite timeout
info: |
Atomics.wait( typedArray, index, value, timeout )
4.Let q be ? ToNumber(timeout).
...
Undefined Return NaN.
5.If q is NaN, let t be +∞, else let t be max(q, 0)
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1536 |
negative-index-throws.js |
---
esid: sec-atomics.wait
description: >
Throws a RangeError is index < 0
info: |
Atomics.wait( typedArray, index, value, timeout )
2.Let i be ? ValidateAtomicAccess(typedArray, index).
...
2.Let accessIndex be ? ToIndex(requestIndex).
...
2.b If integerIndex < 0, throw a RangeError exception
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1411 |
negative-timeout-agent.js |
---
esid: sec-atomics.wait
description: >
Test that Atomics.wait times out with a negative timeout
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1361 |
negative-timeout.js |
---
esid: sec-atomics.wait
description: >
Test that Atomics.wait times out with a negative timeout
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
flags: [CanBlockIsTrue]
--- |
904 |
no-spurious-wakeup-no-operation.js |
---
esid: sec-atomics.wait
description: >
Test that Atomics.wait returns the right result when it timed out and that
the time to time out is reasonable.
info: |
17. Let awoken be Suspend(WL, W, t).
18. If awoken is true, then
a. Assert: W is not on the list of waiters in WL.
19. Else,
a.Perform RemoveWaiter(WL, W).
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1965 |
no-spurious-wakeup-on-add.js |
---
esid: sec-atomics.wait
description: >
Waiter does not spuriously notify on index which is subject to Add operation
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1730 |
no-spurious-wakeup-on-and.js |
---
esid: sec-atomics.wait
description: >
Waiter does not spuriously nofity on index which is subject to And operation
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1730 |
no-spurious-wakeup-on-compareExchange.js |
---
esid: sec-atomics.wait
description: >
Waiter does not spuriously notify on index which is subject to compareExchange operation
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1756 |
no-spurious-wakeup-on-exchange.js |
---
esid: sec-atomics.wait
description: >
Waiter does not spuriously notify on index which is subject to exchange operation
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1738 |
no-spurious-wakeup-on-or.js |
---
esid: sec-atomics.wait
description: >
Waiter does not spuriously notify on index which is subject to Or operation
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1726 |
no-spurious-wakeup-on-store.js |
---
esid: sec-atomics.wait
description: >
Demonstrates that Atomics.store(...) is causing a waiting
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1718 |
no-spurious-wakeup-on-sub.js |
---
esid: sec-atomics.wait
description: >
Waiter does not spuriously notify on index which is subject to Sub operation
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1728 |
no-spurious-wakeup-on-xor.js |
---
esid: sec-atomics.wait
description: >
Waiter does not spuriously notify on index which is subject to xor operation
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1728 |
non-bigint64-typedarray-throws.js |
---
esid: sec-validatesharedintegertypedarray
description: >
Throws a TypeError if typedArray arg is not a BigInt64Array
info: |
Atomics.wait( typedArray, index, value, timeout )
1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
...
ValidateSharedIntegerTypedArray(typedArray [ , waitable ] )
...
5. If waitable is true, then
a. If typeName is not "BigInt64Array",
throw a TypeError exception.
features: [Atomics, BigInt, SharedArrayBuffer]
--- |
1314 |
non-shared-bufferdata-throws.js |
---
esid: sec-atomics.wait
description: >
Throws a TypeError if typedArray.buffer is not a SharedArrayBuffer
info: |
Atomics.wait( typedArray, index, value, timeout )
1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
...
9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception.
...
4.If bufferData is a Data Block, return false.
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
--- |
1069 |
null-bufferdata-throws.js |
---
esid: sec-atomics.wait
description: >
A null value for bufferData throws a TypeError
info: |
Atomics.wait( typedArray, index, value, timeout )
1.Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
...
ValidateSharedIntegerTypedArray(typedArray [ , onlyInt32 ] )
...
9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception.
IsSharedArrayBuffer( obj )
...
3.If bufferData is null, return false.
includes: [detachArrayBuffer.js]
features: [ArrayBuffer, Atomics, BigInt, TypedArray]
--- |
1332 |
out-of-range-index-throws.js |
---
esid: sec-atomics.wait
description: >
Throws a RangeError if value of index arg is out of range
info: |
Atomics.wait( typedArray, index, value, timeout )
2.Let i be ? ValidateAtomicAccess(typedArray, index).
...
2.Let accessIndex be ? ToIndex(requestIndex).
...
5. If accessIndex ≥ length, throw a RangeError exception.
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1337 |
shell.js |
|
0 |
value-not-equal.js |
---
esid: sec-atomics.wait
description: >
Returns "not-equal" when value arg does not match an index in the typedArray
info: |
Atomics.wait( typedArray, index, value, timeout )
3.Let v be ? ToBigInt64(value).
...
14.If v is not equal to w, then
a.Perform LeaveCriticalSection(WL).
b. Return the String "not-equal".
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
1883 |
waiterlist-block-indexedposition-wake.js |
---
esid: sec-atomics.wait
description: >
Get the correct WaiterList
info: |
Atomics.wait( typedArray, index, value, timeout )
...
11. Let WL be GetWaiterList(block, indexedPosition).
...
GetWaiterList( block, i )
...
4. Return the WaiterList that is referenced by the pair (block, i).
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
2365 |
waiterlist-order-of-operations-is-fifo.js |
---
esid: sec-atomics.wait
description: >
New waiters should be applied to the end of the list and woken by order they entered the list (FIFO)
info: |
Atomics.wait( typedArray, index, value, timeout )
16.Perform AddWaiter(WL, W).
...
3.Add W to the end of the list of waiters in WL.
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
2988 |
was-woken-before-timeout.js |
---
esid: sec-atomics.wait
description: >
Test that Atomics.wait returns the right result when it was awoken before
a timeout
info: |
Atomics.wait( typedArray, index, value, timeout )
2.Let i be ? ValidateAtomicAccess(typedArray, index).
...
2.Let accessIndex be ? ToIndex(requestIndex).
9.If IsSharedArrayBuffer(buffer) is false, throw a TypeError exception.
...
3.If bufferData is a Data Block, return false
If value is undefined, then
Let index be 0.
includes: [atomicsHelper.js]
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
--- |
2075 |