mirror of https://github.com/tc39/test262.git
Atomics: ensure all SharedArrayBuffer sizes are uniform
This commit is contained in:
parent
7ec0cdba6c
commit
fc4a6f12cb
|
@ -27,7 +27,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var newValue = 0b00000001000000001000000010000001;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var initial = 0b00000001000000001000000010000001;
|
||||
var other = 0b00000001111111111000000011111111;
|
||||
|
|
|
@ -26,7 +26,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var update = 0b00000001000000001000000010000001;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var update = 0b00000001000000001000000010000001;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var update = 0b00000001000000001000000010000001;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var update = 0b00000001000000001000000010000001;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var update = 0b00000001000000001000000010000001;
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var update = 0b00000001000000001000000010000001;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -16,7 +16,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let,
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -19,7 +19,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
|
@ -41,7 +41,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
|
|
|
@ -17,7 +17,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
const valueOf = {
|
||||
|
|
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
const poisoned = {
|
||||
valueOf: function() {
|
||||
|
|
|
@ -18,7 +18,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
|
|
|
@ -10,7 +10,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
assert.sameValue(Atomics.wait(i64a, 0, 0, -1), "timed-out");
|
||||
|
|
|
@ -29,11 +29,11 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
// NO OPERATION OCCURS HERE!
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [ArrayBuffer, DataView, let, arrow-function, for-of, Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.add(i64a, 0, 1);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ description: >
|
|||
includes: [testAtomics.js]
|
||||
features: [ArrayBuffer, DataView, let, arrow-function, for-of, Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -25,7 +25,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.and(i64a, 0, 1);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ description: >
|
|||
includes: [testAtomics.js]
|
||||
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray, ArrayBuffer, DataView, let, arrow-function, for-of]
|
||||
---*/
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -25,7 +25,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.compareExchange(i64a, 0, 0, 1);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ description: >
|
|||
includes: [testAtomics.js]
|
||||
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray, ArrayBuffer, DataView, let, arrow-function, for-of]
|
||||
---*/
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -25,7 +25,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.exchange(i64a, 0, 1);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ description: >
|
|||
includes: [testAtomics.js]
|
||||
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray, ArrayBuffer, DataView, let, arrow-function, for-of, Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -25,7 +25,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.or(i64a, 0, 1);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ description: >
|
|||
includes: [testAtomics.js]
|
||||
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray, ArrayBuffer, DataView, let, arrow-function, for-of, Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -25,7 +25,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.store(i64a, 0, 0x111111);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ description: >
|
|||
includes: [testAtomics.js]
|
||||
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray, ArrayBuffer, DataView, let, arrow-function, for-of, Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -25,7 +25,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.sub(i64a, 0, 1);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ description: >
|
|||
includes: [testAtomics.js]
|
||||
features: [Atomics, BigInt, SharedArrayBuffer, TypedArray, ArrayBuffer, DataView, let, arrow-function, for-of, Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -25,7 +25,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.xor(i64a, 0, 1);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
const poisoned = {
|
||||
valueOf: function() {
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
|
|
@ -31,7 +31,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
|
|
|
@ -27,8 +27,7 @@ $262.agent.start(`
|
|||
const i64a = new BigInt64Array(sab);
|
||||
|
||||
// Wait on index 0
|
||||
Atomics.wait(i64a, 0, 0, 200);
|
||||
$262.agent.report(0);
|
||||
$262.agent.report(Atomics.wait(i64a, 0, 0, Infinity));
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
|
@ -37,25 +36,32 @@ $262.agent.start(`
|
|||
$262.agent.receiveBroadcast(function(sab) {
|
||||
const i64a = new BigInt64Array(sab);
|
||||
|
||||
// Wait on index 2
|
||||
Atomics.wait(i64a, 2, 0, 200);
|
||||
$262.agent.report(2);
|
||||
// Wait on index 7
|
||||
$262.agent.report(Atomics.wait(i64a, 7, 0, Infinity));
|
||||
$262.agent.leaving();
|
||||
});
|
||||
`);
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(4 * BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
// Wake index 2
|
||||
Atomics.wake(i64a, 2, 1);
|
||||
assert.sameValue(getReport(), '2');
|
||||
// Wake index 1, wakes nothing
|
||||
assert.sameValue(Atomics.wake(i64a, 1), 0, 'Atomics.wake(i64a, 1) returns 0');
|
||||
// Wake index 3, wakes nothing
|
||||
assert.sameValue(Atomics.wake(i64a, 3), 0, 'Atomics.wake(i64a, 3) returns 0');
|
||||
// Wake index 4, wakes nothing
|
||||
assert.sameValue(Atomics.wake(i64a, 4), 0, 'Atomics.wake(i64a, 4) returns 0');
|
||||
// Wake index 5, wakes nothing
|
||||
assert.sameValue(Atomics.wake(i64a, 5), 0, 'Atomics.wake(i64a, 5) returns 0');
|
||||
|
||||
// Wake index 0
|
||||
Atomics.wake(i64a, 0, 1);
|
||||
assert.sameValue(getReport(), '0');
|
||||
// Wake index 7, wakes 1
|
||||
assert.sameValue(Atomics.wake(i64a, 7), 1, 'Atomics.wake(i64a, 7) returns 1');
|
||||
assert.sameValue(getReport(), 'ok', 'getReport() returns "ok"');
|
||||
|
||||
// Wake index 0, wakes 1
|
||||
assert.sameValue(Atomics.wake(i64a, 0), 1, 'Atomics.wake(i64a, 0) returns 1');
|
||||
assert.sameValue(getReport(), 'ok', 'getReport() returns "ok"');
|
||||
|
|
|
@ -54,7 +54,7 @@ $262.agent.start(`
|
|||
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(4 * BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
|
|
|
@ -37,7 +37,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i64a.buffer);
|
||||
|
|
|
@ -19,7 +19,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
|
@ -41,7 +41,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -17,7 +17,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const valueOf = {
|
||||
|
|
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -19,7 +19,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
|
|
@ -18,7 +18,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -10,7 +10,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
assert.sameValue(Atomics.wait(i32a, 0, 0, -1), "timed-out");
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [ArrayBuffer, DataView, let, arrow-function, for-of, Atomics, BigInt, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.add(i32a, 0, 1);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.and(i32a, 0, 1);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.compareExchange(i32a, 0, 0, 1);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.exchange(i32a, 0, 1);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.or(i32a, 0, 1);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.store(i32a, 0, 0x111111);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.sub(i32a, 0, 1);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ includes: [atomicsHelper.js]
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
const TIMEOUT = 2000;
|
||||
const TIMEOUT = 200;
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.start(`
|
||||
|
@ -26,7 +26,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
$262.agent.sleep(100);
|
||||
$262.agent.sleep(10);
|
||||
|
||||
Atomics.xor(i32a, 0, 1);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [ArrayBuffer, Atomics, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
|
|
@ -41,7 +41,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -17,7 +17,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const valueOf = {
|
||||
|
|
|
@ -46,7 +46,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -21,7 +21,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const valueOf = {
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
@ -30,7 +30,10 @@ assert.throws(RangeError, function() {
|
|||
Atomics.wait(i32a, Infinity, poisoned, poisoned);
|
||||
});
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.wait(i32a, 2, poisoned, poisoned);
|
||||
Atomics.wait(i32a, -1, poisoned, poisoned);
|
||||
});
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.wait(i32a, 4, poisoned, poisoned);
|
||||
});
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.wait(i32a, 200, poisoned, poisoned);
|
||||
|
|
|
@ -48,7 +48,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -19,7 +19,7 @@ features: [Atomics, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisonedValueOf = {
|
||||
|
|
|
@ -61,7 +61,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -29,7 +29,7 @@ features: [Atomics, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisonedValueOf = {
|
||||
|
|
|
@ -35,7 +35,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -52,7 +52,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -20,7 +20,7 @@ features: [Atomics, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisonedValueOf = {
|
||||
|
|
|
@ -41,7 +41,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -17,7 +17,7 @@ flags: [CanBlockIsFalse]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const valueOf = {
|
||||
|
|
|
@ -29,8 +29,7 @@ $262.agent.start(`
|
|||
});
|
||||
`);
|
||||
|
||||
$262.agent.start(
|
||||
`
|
||||
$262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab) {
|
||||
var i32a = new Int32Array(sab);
|
||||
$262.agent.report("B " + Atomics.wait(i32a, 0, 0)); // undefined timeout arg => NaN => +Infinity
|
||||
|
@ -39,7 +38,7 @@ $262.agent.start(
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -31,7 +31,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -31,7 +31,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -27,7 +27,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -55,7 +55,7 @@ $262.agent.start(`
|
|||
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(4 * Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -37,7 +37,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -16,7 +16,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -16,7 +16,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, DataView, for-of, let,
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
|
||||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [ArrayBuffer, Atomics, BigInt, TypedArray]
|
|||
---*/
|
||||
|
||||
const i64a = new BigInt64Array(
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
const poisoned = {
|
||||
valueOf: function() {
|
||||
|
|
|
@ -26,7 +26,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
|
|
|
@ -52,7 +52,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -50,7 +50,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -25,7 +25,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
NaNs.forEach(nan => {
|
||||
|
|
|
@ -18,7 +18,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
|
@ -18,7 +18,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
|
|
@ -18,7 +18,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [ArrayBuffer, Atomics, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisoned = {
|
||||
|
|
|
@ -17,7 +17,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
var poisoned = {
|
||||
|
|
|
@ -29,7 +29,7 @@ features: [Atomics, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray]
|
|||
---*/
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
const poisonedValueOf = {
|
||||
|
|
|
@ -39,7 +39,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -18,7 +18,7 @@ $262.agent.start(`
|
|||
`);
|
||||
|
||||
const i32a = new Int32Array(
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)
|
||||
new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
|
||||
$262.agent.broadcast(i32a.buffer);
|
||||
|
|
|
@ -27,7 +27,7 @@ info: |
|
|||
features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||
---*/
|
||||
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT);
|
||||
var buffer = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 4);
|
||||
var i32a = new Int32Array(buffer);
|
||||
var initial = 0b00000001000000001000000010000001;
|
||||
var update = 0b00000001111111111000000011111111;
|
||||
|
|
Loading…
Reference in New Issue