bad-range.js |
---
esid: sec-atomics.waitasync
description: >
Test range checking of Atomics.waitAsync on arrays that allow atomic operations
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
...
2. Let i be ? ValidateAtomicAccess(typedArray, index).
...
includes: [testAtomics.js]
features: [Atomics.waitAsync, Atomics, SharedArrayBuffer, ArrayBuffer, DataView, Symbol, TypedArray, BigInt]
--- |
1489 |
browser.js |
|
0 |
false-for-timeout-agent.js |
---
esid: sec-atomics.waitasync
description: >
False timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
3288 |
false-for-timeout.js |
---
esid: sec-atomics.waitasync
description: >
False timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
flags: [async]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, computed-property-names, Symbol, Symbol.toPrimitive, arrow-function]
--- |
2303 |
good-views.js |
---
esid: sec-atomics.waitasync
description: >
Test Atomics.waitAsync on arrays that allow atomic operations
flags: [async]
includes: [atomicsHelper.js, asyncHelpers.js]
features: [Atomics.waitAsync, Atomics, BigInt]
--- |
2376 |
nan-for-timeout-agent.js |
---
esid: sec-atomics.waitasync
description: >
NaN timeout arg should result in an infinite timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
1987 |
negative-index-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a RangeError is index < 0
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
2. Let i be ? ValidateAtomicAccess(typedArray, index).
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt]
--- |
2052 |
negative-timeout-agent.js |
---
esid: sec-atomics.waitasync
description: >
Test that Atomics.waitAsync times out with a negative timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
1996 |
negative-timeout.js |
---
esid: sec-atomics.waitasync
description: >
Test that Atomics.waitAsync times out with a negative timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
flags: [async]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, destructuring-binding, arrow-function]
--- |
1367 |
no-spurious-wakeup-no-operation.js |
---
esid: sec-atomics.waitasync
description: >
Test that Atomics.waitAsync returns the right result when it timed out and that
the time to time out is reasonable.
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2689 |
no-spurious-wakeup-on-add.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to Add operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2676 |
no-spurious-wakeup-on-and.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to And operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2676 |
no-spurious-wakeup-on-compareExchange.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to compareExchange operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2704 |
no-spurious-wakeup-on-exchange.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to exchange operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2686 |
no-spurious-wakeup-on-or.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to Or operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2674 |
no-spurious-wakeup-on-store.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to Store operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2685 |
no-spurious-wakeup-on-sub.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to Sub operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2676 |
no-spurious-wakeup-on-xor.js |
---
esid: sec-atomics.waitasync
description: >
Waiter does not spuriously notify on index which is subject to xor operation
info: |
AddWaiter ( WL, waiterRecord )
5. Append waiterRecord as the last element of WL.[[Waiters]]
6. If waiterRecord.[[Timeout]] is finite, then in parallel,
a. Wait waiterRecord.[[Timeout]] milliseconds.
b. Perform TriggerTimeout(WL, waiterRecord).
TriggerTimeout( WL, waiterRecord )
3. If waiterRecord is in WL.[[Waiters]], then
a. Set waiterRecord.[[Result]] to "timed-out".
b. Perform RemoveWaiter(WL, waiterRecord).
c. Perform NotifyWaiter(WL, waiterRecord).
4. Perform LeaveCriticalSection(WL).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2676 |
non-bigint64-typedarray-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if typedArray arg is not an BigInt64Array
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, 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 "Int32Array" or "BigInt64Array", throw a TypeError exception.
features: [Atomics.waitAsync, Float32Array, Float64Array, Int8Array, TypedArray, Uint16Array, Uint8Array, Uint8ClampedArray, arrow-function, SharedArrayBuffer, Atomics]
--- |
1840 |
non-shared-bufferdata-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if typedArray.buffer is not a SharedArrayBuffer
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, 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" or "BigInt64Array", throw a TypeError exception.
features: [Atomics.waitAsync, ArrayBuffer, Atomics, TypedArray, BigInt, arrow-function]
--- |
1615 |
not-a-typedarray-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if the typedArray arg is not a TypedArray object
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
ValidateSharedIntegerTypedArray ( typedArray [ , waitable ] )
2. Perform ? RequireInternalSlot(typedArray, [[TypedArrayName]]).
RequireInternalSlot ( O, internalSlot )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have an internalSlot internal slot, throw a TypeError exception.
features: [Atomics.waitAsync, arrow-function, Atomics]
--- |
1623 |
not-an-object-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if typedArray arg is not an Object
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
ValidateSharedIntegerTypedArray ( typedArray [ , waitable ] )
2. Perform ? RequireInternalSlot(typedArray, [[TypedArrayName]]).
RequireInternalSlot ( O, internalSlot )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have an internalSlot internal slot, throw a TypeError exception.
features: [Atomics.waitAsync, Symbol, arrow-function, Atomics]
--- |
2688 |
null-bufferdata-throws.js |
---
esid: sec-atomics.waitasync
description: >
A null value for bufferData throws a TypeError
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true).
ValidateSharedIntegerTypedArray ( typedArray [ , waitable ] )
2. Perform ? RequireInternalSlot(typedArray, [[TypedArrayName]]).
RequireInternalSlot ( O, internalSlot )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have an internalSlot internal slot, throw a TypeError exception.
includes: [detachArrayBuffer.js]
features: [Atomics.waitAsync, ArrayBuffer, Atomics, TypedArray, BigInt]
--- |
1854 |
null-for-timeout-agent.js |
---
esid: sec-atomics.waitasync
description: >
null timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Null -> Return +0.
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
3307 |
null-for-timeout.js |
---
esid: sec-atomics.waitasync
description: >
null timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Null -> Return +0.
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, computed-property-names, Atomics, BigInt, arrow-function]
--- |
1848 |
object-for-timeout-agent.js |
---
esid: sec-atomics.waitasync
description: >
Object valueOf, toString, toPrimitive Zero timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Object -> Apply the following steps:
Let primValue be ? ToPrimitive(argument, hint Number).
Return ? ToNumber(primValue).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
3531 |
object-for-timeout.js |
---
esid: sec-atomics.waitasync
description: >
Object valueOf, toString, toPrimitive Zero timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Object -> Apply the following steps:
Let primValue be ? ToPrimitive(argument, hint Number).
Return ? ToNumber(primValue).
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, computed-property-names, Atomics, BigInt, arrow-function]
flags: [async]
--- |
2539 |
out-of-range-index-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a RangeError if value of index arg is out of range
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, 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.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt]
--- |
2121 |
poisoned-object-for-timeout-throws-agent.js |
---
esid: sec-atomics.waitasync
description: >
False timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Let primValue be ? ToPrimitive(argument, hint Number).
Return ? ToNumber(primValue).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2814 |
poisoned-object-for-timeout-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if index arg can not be converted to an Integer
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Let primValue be ? ToPrimitive(argument, hint Number).
Return ? ToNumber(primValue).
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, computed-property-names, Atomics, BigInt]
--- |
1915 |
shell.js |
|
0 |
symbol-for-index-throws-agent.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if index arg can not be converted to an Integer
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
2. Let i be ? ValidateAtomicAccess(typedArray, index).
ValidateAtomicAccess( typedArray, requestIndex )
2. Let accessIndex be ? ToIndex(requestIndex).
ToIndex ( value )
2. Else,
a. Let integerIndex be ? ToInteger(value).
ToInteger(value)
1. Let number be ? ToNumber(argument).
Symbol --> Throw a TypeError exception.
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
3101 |
symbol-for-index-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if index arg can not be converted to an Integer
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
2. Let i be ? ValidateAtomicAccess(typedArray, index).
ValidateAtomicAccess( typedArray, requestIndex )
2. Let accessIndex be ? ToIndex(requestIndex).
ToIndex ( value )
2. Else,
a. Let integerIndex be ? ToInteger(value).
ToInteger(value)
1. Let number be ? ToNumber(argument).
Symbol --> Throw a TypeError exception.
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, computed-property-names, Atomics, BigInt]
--- |
2712 |
symbol-for-timeout-throws-agent.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if index arg can not be converted to an Integer
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Symbol --> Throw a TypeError exception.
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2518 |
symbol-for-timeout-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if index arg can not be converted to an Integer
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Symbol --> Throw a TypeError exception.
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, computed-property-names, Atomics, BigInt]
--- |
2214 |
symbol-for-value-throws-agent.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if value arg is a Symbol
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
5. Otherwise, let v be ? ToInt32(value).
ToInt32(value)
1.Let number be ? ToNumber(argument).
Symbol --> Throw a TypeError exception.
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2883 |
symbol-for-value-throws.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if value arg is a Symbol
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
5. Otherwise, let v be ? ToInt32(value).
ToInt32(value)
1.Let number be ? ToNumber(argument).
Symbol --> Throw a TypeError exception.
features: [Atomics.waitAsync, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray, computed-property-names, Atomics, BigInt]
--- |
2384 |
true-for-timeout-agent.js |
---
esid: sec-atomics.waitasync
description: >
True timeout arg should result in an +0 timeout
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2598 |
true-for-timeout.js |
---
esid: sec-atomics.waitasync
description: >
Throws a TypeError if index arg can not be converted to an Integer
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
Boolean -> If argument is true, return 1. If argument is false, return +0.
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, computed-property-names, Symbol, Symbol.toPrimitive, arrow-function]
--- |
2260 |
undefined-for-timeout-agent.js |
---
esid: sec-atomics.waitasync
description: >
Undefined timeout arg is coerced to zero
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
...
Undefined Return NaN.
5.If q is NaN, let t be +∞, else let t be max(q, 0)
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2765 |
undefined-for-timeout.js |
---
esid: sec-atomics.waitasync
description: >
Undefined timeout arg is coerced to zero
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
6. Let q be ? ToNumber(timeout).
...
Undefined Return NaN.
5.If q is NaN, let t be +∞, else let t be max(q, 0)
flags: [async]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, computed-property-names, Symbol, Symbol.toPrimitive, arrow-function]
--- |
2004 |
undefined-index-defaults-to-zero-agent.js |
---
esid: sec-atomics.waitasync
description: >
Undefined index arg is coerced to zero
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, 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.
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2883 |
value-not-equal-agent.js |
---
esid: sec-atomics.waitasync
description: >
Returns "not-equal" when value arg does not match an index in the typedArray
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
16. Let w be ! AtomicLoad(typedArray, i).
17. If v is not equal to w, then
a. Perform LeaveCriticalSection(WL).
b. If mode is sync, then
i. Return the String "not-equal".
c. Perform ! Call(capability.[[Resolve]], undefined, « "not-equal" »).
d. Return promiseCapability.[[Promise]].
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2529 |
value-not-equal.js |
---
esid: sec-atomics.waitasync
description: >
Returns "not-equal" when value arg does not match an index in the typedArray
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
16. Let w be ! AtomicLoad(typedArray, i).
17. If v is not equal to w, then
a. Perform LeaveCriticalSection(WL).
b. If mode is sync, then
i. Return the String "not-equal".
c. Perform ! Call(capability.[[Resolve]], undefined, « "not-equal" »).
d. Return promiseCapability.[[Promise]].
flags: [async]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, BigInt, computed-property-names, Symbol, Symbol.toPrimitive, Atomics, arrow-function]
--- |
1930 |
waiterlist-block-indexedposition-wake.js |
---
esid: sec-atomics.waitasync
description: >
Get the correct WaiterList
info: |
Atomics.waitAsync( typedArray, index, value, timeout )
1. Return DoWait(async, typedArray, index, value, timeout).
DoWait ( mode, typedArray, index, value, timeout )
11. Let indexedPosition be (i × 4) + offset.
12. Let WL be GetWaiterList(block, indexedPosition).
GetWaiterList( block, i )
...
4. Return the WaiterList that is referenced by the pair (block, i).
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
3306 |
was-woken-before-timeout.js |
---
esid: sec-atomics.waitasync
description: >
Test that Atomics.waitAsync returns the right result when it was awoken before
a timeout
flags: [async]
includes: [atomicsHelper.js]
features: [Atomics.waitAsync, SharedArrayBuffer, TypedArray, Atomics, BigInt, arrow-function, async-functions]
--- |
2353 |