diff --git a/test/built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js b/test/built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js index b598647e0750e72abe1d66177bd720aa9b7e7f6c..6f9bb220c2538a7f55f2bbbbb54e943685e696b0 100644 --- a/test/built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js +++ b/test/built-ins/Atomics/wait/waiterlist-order-of-operations-is-fifo.js @@ -29,10 +29,10 @@ var agent3 = '3'; $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); + var i32a = new Int32Array(sab); $262.agent.report(${agent1}); - Atomics.wait(int32Array, 0, 0); + Atomics.wait(i32a, 0, 0); $262.agent.report(${agent1}); $262.agent.leaving(); @@ -41,11 +41,11 @@ $262.agent.receiveBroadcast(function(sab) { $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); + var i32a = new Int32Array(sab); $262.agent.report(${agent2}); - Atomics.wait(int32Array, 0, 0); + Atomics.wait(i32a, 0, 0); $262.agent.report(${agent2}); $262.agent.leaving(); @@ -54,11 +54,11 @@ $262.agent.receiveBroadcast(function(sab) { $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); + var i32a = new Int32Array(sab); $262.agent.report(${agent3}); - Atomics.wait(int32Array, 0, 0); + Atomics.wait(i32a, 0, 0); $262.agent.report(${agent3}); $262.agent.leaving(); @@ -66,21 +66,21 @@ $262.agent.receiveBroadcast(function(sab) { `); -var int32Array = new Int32Array(new SharedArrayBuffer(4)); +var i32a = new Int32Array(new SharedArrayBuffer(4)); -$262.agent.broadcast(int32Array.buffer); +$262.agent.broadcast(i32a.buffer); var orderWhichAgentsWereStarted = getReport() + getReport() + getReport(); // can be started in any order -assert.sameValue(Atomics.wake(int32Array, 0, 1), 1); +assert.sameValue(Atomics.wake(i32a, 0, 1), 1); var orderAgentsWereWoken = getReport(); -assert.sameValue(Atomics.wake(int32Array, 0, 1), 1); +assert.sameValue(Atomics.wake(i32a, 0, 1), 1); orderAgentsWereWoken += getReport(); -assert.sameValue(Atomics.wake(int32Array, 0, 1), 1); +assert.sameValue(Atomics.wake(i32a, 0, 1), 1); orderAgentsWereWoken += getReport(); diff --git a/test/built-ins/Atomics/wait/was-woken-before-timeout.js b/test/built-ins/Atomics/wait/was-woken-before-timeout.js index 936e10fb1ad0ab6b5c52aed7654a4ef216458753..b0efbcb149eba4d1c9a69acc85797ed06eece0e4 100644 --- a/test/built-ins/Atomics/wait/was-woken-before-timeout.js +++ b/test/built-ins/Atomics/wait/was-woken-before-timeout.js @@ -35,20 +35,20 @@ function getReport() { $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report(Atomics.wait(int32Array, 0, 0, ${timeout})); + var i32a = new Int32Array(sab); + $262.agent.report(Atomics.wait(i32a, 0, 0, ${timeout})); $262.agent.leaving(); }); `); var sab = new SharedArrayBuffer(4); -var int32Array = new Int32Array(sab); +var i32a = new Int32Array(sab); -$262.agent.broadcast(int32Array.buffer); +$262.agent.broadcast(i32a.buffer); $262.agent.sleep(sleeping); -assert.sameValue(Atomics.wake(int32Array, 0), 1); +assert.sameValue(Atomics.wake(i32a, 0), 1); assert.sameValue(getReport(), "ok"); assert(sleeping < timeout, "this test assumes it won't last for more than 20 seconds"); diff --git a/test/built-ins/Atomics/wake/count-defaults-to-infinity-missing.js b/test/built-ins/Atomics/wake/count-defaults-to-infinity-missing.js index cb874c15212d33e59863e793c94e3846556c194e..d85adb770960882f8ae7ed4b487439d30a7eb90c 100644 --- a/test/built-ins/Atomics/wake/count-defaults-to-infinity-missing.js +++ b/test/built-ins/Atomics/wake/count-defaults-to-infinity-missing.js @@ -28,43 +28,43 @@ function getReport() { $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("A " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("A " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("B " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("B " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("C " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("C " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("D " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("D " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); -var int32Array = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)); +var i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)); -$262.agent.broadcast(int32Array.buffer); +$262.agent.broadcast(i32a.buffer); $262.agent.sleep(20); -assert.sameValue(Atomics.wake(int32Array, WAKEUP /*, count missing */), NUMAGENT); +assert.sameValue(Atomics.wake(i32a, WAKEUP /*, count missing */), NUMAGENT); var sortedReports = []; for (var i = 0; i < NUMAGENT; i++) { diff --git a/test/built-ins/Atomics/wake/count-defaults-to-infinity-undefined.js b/test/built-ins/Atomics/wake/count-defaults-to-infinity-undefined.js index 3102906298b7ab268ab4acb5aa5e01bdefe63c8d..b6f26bb05feb72a0dbfc4a0065c525a3887e5183 100644 --- a/test/built-ins/Atomics/wake/count-defaults-to-infinity-undefined.js +++ b/test/built-ins/Atomics/wake/count-defaults-to-infinity-undefined.js @@ -26,16 +26,16 @@ function getReport() { $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("A " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("A " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("B " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("B " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); @@ -43,8 +43,8 @@ $262.agent.receiveBroadcast(function(sab) { $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("C " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("C " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); @@ -52,19 +52,19 @@ $262.agent.receiveBroadcast(function(sab) { $262.agent.start(` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report("D " + Atomics.wait(int32Array, ${WAKEUP}, 0, 50)); + var i32a = new Int32Array(sab); + $262.agent.report("D " + Atomics.wait(i32a, ${WAKEUP}, 0, 50)); $262.agent.leaving(); }); `); -var int32Array = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)); +var i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)); -$262.agent.broadcast(int32Array.buffer); +$262.agent.broadcast(i32a.buffer); $262.agent.sleep(20); // half of timeout -assert.sameValue(Atomics.wake(int32Array, WAKEUP, undefined), NUMAGENT); +assert.sameValue(Atomics.wake(i32a, WAKEUP, undefined), NUMAGENT); var sortedReports = []; for (var i = 0; i < NUMAGENT; i++) { diff --git a/test/built-ins/Atomics/wake/negative-index-throws.js b/test/built-ins/Atomics/wake/negative-index-throws.js index 52b875561afae36b39b7287c0c51c5b7a1ac7fd5..442fd4820a763172bbe16a35a288606efa2c6e6e 100644 --- a/test/built-ins/Atomics/wake/negative-index-throws.js +++ b/test/built-ins/Atomics/wake/negative-index-throws.js @@ -17,14 +17,14 @@ features: [Atomics, SharedArrayBuffer, TypedArray] ---*/ var sab = new SharedArrayBuffer(1024); -var int32Array = new Int32Array(sab); +var i32a = new Int32Array(sab); var poisoned = { valueOf: function() { throw new Test262Error("should not evaluate this code"); } }; -assert.throws(RangeError, () => Atomics.wake(int32Array, -Infinity, poisoned)); -assert.throws(RangeError, () => Atomics.wake(int32Array, -7.999, poisoned)); -assert.throws(RangeError, () => Atomics.wake(int32Array, -1, poisoned)); -assert.throws(RangeError, () => Atomics.wake(int32Array, -300, poisoned)); +assert.throws(RangeError, () => Atomics.wake(i32a, -Infinity, poisoned)); +assert.throws(RangeError, () => Atomics.wake(i32a, -7.999, poisoned)); +assert.throws(RangeError, () => Atomics.wake(i32a, -1, poisoned)); +assert.throws(RangeError, () => Atomics.wake(i32a, -300, poisoned)); diff --git a/test/built-ins/Atomics/wake/non-shared-bufferdata-throws.js b/test/built-ins/Atomics/wake/non-shared-bufferdata-throws.js index aec2cdb08ba048af541b1942d2212881b1279ff6..bd783ab62a09511ae11b330d399112d3f56b7669 100644 --- a/test/built-ins/Atomics/wake/non-shared-bufferdata-throws.js +++ b/test/built-ins/Atomics/wake/non-shared-bufferdata-throws.js @@ -15,7 +15,7 @@ info: | features: [ArrayBuffer, Atomics, TypedArray] ---*/ -var int32Array = new Int32Array(new ArrayBuffer(4)); +var i32a = new Int32Array(new ArrayBuffer(4)); var poisoned = { valueOf: function() { throw new Test262Error("should not evaluate this code"); @@ -23,9 +23,9 @@ var poisoned = { }; assert.throws(TypeError, function() { - Atomics.wake(int32Array, 0, 0) + Atomics.wake(i32a, 0, 0); }); assert.throws(TypeError, function() { - Atomics.wake(int32Array, poisoned, poisoned) + Atomics.wake(i32a, poisoned, poisoned); }); diff --git a/test/built-ins/Atomics/wake/null-bufferdata-throws.js b/test/built-ins/Atomics/wake/null-bufferdata-throws.js index ad38f7432e8830c233b2b7beb9bcd4f56b2fb987..fb3cf8ee4e2185e0f95b14c467875f914320fe20 100644 --- a/test/built-ins/Atomics/wake/null-bufferdata-throws.js +++ b/test/built-ins/Atomics/wake/null-bufferdata-throws.js @@ -16,15 +16,15 @@ includes: [detachArrayBuffer.js] features: [ArrayBuffer, Atomics, TypedArray] ---*/ -var int32Array = new Int32Array(new ArrayBuffer(1024)); +var i32a = new Int32Array(new ArrayBuffer(1024)); var poisoned = { valueOf: function() { throw new Test262Error("should not evaluate this code"); } }; -$DETACHBUFFER(int32Array.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null +$DETACHBUFFER(i32a.buffer); // Detaching a non-shared ArrayBuffer sets the [[ArrayBufferData]] value to null assert.throws(TypeError, function() { - Atomics.wake(int32Array, poisoned, poisoned); + Atomics.wake(i32a, poisoned, poisoned); }); diff --git a/test/built-ins/Atomics/wake/out-of-range-index-throws.js b/test/built-ins/Atomics/wake/out-of-range-index-throws.js index b48b090dc650235193aaa8b8bb580a7f60315a20..a07c2bdeb4f79d58524d217be3a77219b84a1526 100644 --- a/test/built-ins/Atomics/wake/out-of-range-index-throws.js +++ b/test/built-ins/Atomics/wake/out-of-range-index-throws.js @@ -16,7 +16,7 @@ description: > features: [Atomics, SharedArrayBuffer, TypedArray] ---*/ -var int32Array = new Int32Array(new SharedArrayBuffer(4)); +var i32a = new Int32Array(new SharedArrayBuffer(4)); var poisoned = { valueOf: function() { throw new Test262Error("should not evaluate this code"); @@ -24,11 +24,11 @@ var poisoned = { }; assert.throws(RangeError, function() { - Atomics.wake(int32Array, Infinity, poisoned); + Atomics.wake(i32a, Infinity, poisoned); }); assert.throws(RangeError, function() { - Atomics.wake(int32Array, 2, poisoned); + Atomics.wake(i32a, 2, poisoned); }); assert.throws(RangeError, function() { - Atomics.wake(int32Array, 200, poisoned); + Atomics.wake(i32a, 200, poisoned); }); diff --git a/test/built-ins/Atomics/wake/symbol-for-index-throws.js b/test/built-ins/Atomics/wake/symbol-for-index-throws.js index cdd0a1145fbec98348430e2eb6ee76c421931ac4..2fb0b470f0cd87517992443f1ca584844b8c0cf5 100644 --- a/test/built-ins/Atomics/wake/symbol-for-index-throws.js +++ b/test/built-ins/Atomics/wake/symbol-for-index-throws.js @@ -29,7 +29,7 @@ features: [Atomics, SharedArrayBuffer, Symbol, Symbol.toPrimitive, TypedArray] ---*/ var buffer = new SharedArrayBuffer(1024); -var int32Array = new Int32Array(buffer); +var i32a = new Int32Array(buffer); var poisonedValueOf = { valueOf: function() { @@ -44,17 +44,17 @@ var poisonedToPrimitive = { }; assert.throws(Test262Error, function() { - Atomics.wake(int32Array, poisonedValueOf, poisonedValueOf); + Atomics.wake(i32a, poisonedValueOf, poisonedValueOf); }); assert.throws(Test262Error, function() { - Atomics.wake(int32Array, poisonedToPrimitive, poisonedToPrimitive); + Atomics.wake(i32a, poisonedToPrimitive, poisonedToPrimitive); }); assert.throws(TypeError, function() { - Atomics.wake(int32Array, Symbol("foo"), poisonedValueOf); + Atomics.wake(i32a, Symbol("foo"), poisonedValueOf); }); assert.throws(TypeError, function() { - Atomics.wake(int32Array, Symbol("foo"), poisonedToPrimitive); + Atomics.wake(i32a, Symbol("foo"), poisonedToPrimitive); }); diff --git a/test/built-ins/Atomics/wake/undefined-index-defaults-to-zero.js b/test/built-ins/Atomics/wake/undefined-index-defaults-to-zero.js index 4b8d346a40f1e7809f7a74ff3ec7101cb9dd0145..a6a3e68d024f76879d4ac3b5fe48937722da083f 100644 --- a/test/built-ins/Atomics/wake/undefined-index-defaults-to-zero.js +++ b/test/built-ins/Atomics/wake/undefined-index-defaults-to-zero.js @@ -24,8 +24,8 @@ features: [Atomics, SharedArrayBuffer, TypedArray] $262.agent.start( ` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report(Atomics.wait(int32Array, 0, 0, 200)); + var i32a = new Int32Array(sab); + $262.agent.report(Atomics.wait(i32a, 0, 0, 200)); $262.agent.leaving(); }) @@ -35,23 +35,23 @@ $262.agent.receiveBroadcast(function(sab) { ;$262.agent.start( ` $262.agent.receiveBroadcast(function(sab) { - var int32Array = new Int32Array(sab); - $262.agent.report(Atomics.wait(int32Array, 0, 0, 200)); + var i32a = new Int32Array(sab); + $262.agent.report(Atomics.wait(i32a, 0, 0, 200)); $262.agent.leaving(); }) `); var sab = new SharedArrayBuffer(4); -var int32Array = new Int32Array(sab); +var i32a = new Int32Array(sab); -$262.agent.broadcast(int32Array.buffer); +$262.agent.broadcast(i32a.buffer); $262.agent.sleep(100); // halfway through timeout -assert.sameValue(Atomics.wake(int32Array, undefined, 1), 1); // wake at index 0 +assert.sameValue(Atomics.wake(i32a, undefined, 1), 1); // wake at index 0 assert.sameValue(getReport(), "ok"); -assert.sameValue(Atomics.wake(int32Array), 1); // wake again at index 0 +assert.sameValue(Atomics.wake(i32a), 1); // wake again at index 0 assert.sameValue(getReport(), "ok"); function getReport() {