From 4911c6e77af9b44c3354fd61d39107552b724ea8 Mon Sep 17 00:00:00 2001
From: Leo Balter <leonardo.balter@gmail.com>
Date: Thu, 28 Jun 2018 16:20:22 -0400
Subject: [PATCH] Last renamings in the Atomics/wake folder

---
 .../Atomics/notify/bigint/notify-all-on-loc.js   |  8 ++++----
 test/built-ins/Atomics/notify/descriptor.js      |  2 +-
 test/built-ins/Atomics/notify/name.js            |  4 ++--
 test/built-ins/Atomics/notify/negative-count.js  |  2 +-
 .../Atomics/notify/notify-all-on-loc.js          |  8 ++++----
 test/built-ins/Atomics/notify/notify-all.js      |  6 +++---
 .../Atomics/notify/notify-in-order-one-time.js   |  6 +++---
 test/built-ins/Atomics/notify/notify-in-order.js |  6 +++---
 test/built-ins/Atomics/notify/notify-one.js      | 16 ++++++++--------
 test/built-ins/Atomics/notify/notify-two.js      | 16 ++++++++--------
 .../notify/notify-with-no-agents-waiting.js      |  4 ++--
 .../notify-with-no-matching-agents-waiting.js    |  2 +-
 test/built-ins/Atomics/notify/notify-zero.js     | 10 +++++-----
 .../notify/undefined-index-defaults-to-zero.js   |  4 ++--
 14 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/test/built-ins/Atomics/notify/bigint/notify-all-on-loc.js b/test/built-ins/Atomics/notify/bigint/notify-all-on-loc.js
index b3f7a4343c..f39190a80c 100644
--- a/test/built-ins/Atomics/notify/bigint/notify-all-on-loc.js
+++ b/test/built-ins/Atomics/notify/bigint/notify-all-on-loc.js
@@ -4,8 +4,8 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes all waiters on a location, but does not
-  wake waiters on other locations.
+  Test that Atomics.notify notifies all waiters on a location, but does not
+  notify waiters on other locations.
 includes: [atomicsHelper.js]
 features: [Atomics, BigInt, SharedArrayBuffer, TypedArray]
 ---*/
@@ -63,10 +63,10 @@ $262.agent.broadcast(i64a.buffer);
 $262.agent.waitUntil(i64a, RUNNING, BigInt(NUMAGENT + 1));
 
 // Try to yield control to ensure the agent actually started to wait. If we
-// don't, we risk sending the wakeup before agents are sleeping, and we hang.
+// don't, we risk sending the notification before agents are sleeping, and we hang.
 $262.agent.tryYield();
 
-// Wake all waiting on WAIT_INDEX, should be 3 always, they won't time out.
+// Notify all waiting on WAIT_INDEX, should be 3 always, they won't time out.
 assert.sameValue(
   Atomics.notify(i64a, WAIT_INDEX),
   NUMAGENT,
diff --git a/test/built-ins/Atomics/notify/descriptor.js b/test/built-ins/Atomics/notify/descriptor.js
index 717810a3be..787ec6b93c 100644
--- a/test/built-ins/Atomics/notify/descriptor.js
+++ b/test/built-ins/Atomics/notify/descriptor.js
@@ -8,7 +8,7 @@ includes: [propertyHelper.js]
 features: [Atomics]
 ---*/
 
-verifyProperty(Atomics, 'wake', {
+verifyProperty(Atomics, 'notify', {
   enumerable: false,
   writable: true,
   configurable: true,
diff --git a/test/built-ins/Atomics/notify/name.js b/test/built-ins/Atomics/notify/name.js
index 7d699c2b9b..bcddfd3499 100644
--- a/test/built-ins/Atomics/notify/name.js
+++ b/test/built-ins/Atomics/notify/name.js
@@ -5,13 +5,13 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Atomics.notify.name is "wake".
+  Atomics.notify.name is "notify".
 includes: [propertyHelper.js]
 features: [Atomics]
 ---*/
 
 verifyProperty(Atomics.notify, 'name', {
-  value: 'wake',
+  value: 'notify',
   enumerable: false,
   writable: false,
   configurable: true,
diff --git a/test/built-ins/Atomics/notify/negative-count.js b/test/built-ins/Atomics/notify/negative-count.js
index 29b44b70a0..8cc7f0b036 100644
--- a/test/built-ins/Atomics/notify/negative-count.js
+++ b/test/built-ins/Atomics/notify/negative-count.js
@@ -4,7 +4,7 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes zero waiters if the count is negative
+  Test that Atomics.notify notifies zero waiters if the count is negative
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
diff --git a/test/built-ins/Atomics/notify/notify-all-on-loc.js b/test/built-ins/Atomics/notify/notify-all-on-loc.js
index 85c1dbf576..863066d23b 100644
--- a/test/built-ins/Atomics/notify/notify-all-on-loc.js
+++ b/test/built-ins/Atomics/notify/notify-all-on-loc.js
@@ -4,8 +4,8 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes all waiters on a location, but does not
-  wake waiters on other locations.
+  Test that Atomics.notify notifies all waiters on a location, but does not
+  notify waiters on other locations.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
@@ -63,10 +63,10 @@ $262.agent.broadcast(i32a.buffer);
 $262.agent.waitUntil(i32a, RUNNING, NUMAGENT + 1);
 
 // Try to yield control to ensure the agent actually started to wait. If we
-// don't, we risk sending the wakeup before agents are sleeping, and we hang.
+// don't, we risk sending the notification before agents are sleeping, and we hang.
 $262.agent.tryYield();
 
-// Wake all waiting on WAIT_INDEX, should be 3 always, they won't time out.
+// Notify all waiting on WAIT_INDEX, should be 3 always, they won't time out.
 assert.sameValue(
   Atomics.notify(i32a, WAIT_INDEX),
   NUMAGENT,
diff --git a/test/built-ins/Atomics/notify/notify-all.js b/test/built-ins/Atomics/notify/notify-all.js
index 43a9d5a430..02fa23edf2 100644
--- a/test/built-ins/Atomics/notify/notify-all.js
+++ b/test/built-ins/Atomics/notify/notify-all.js
@@ -4,7 +4,7 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes all waiters if that's what the count is.
+  Test that Atomics.notify notifies all waiters if that's what the count is.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
@@ -36,10 +36,10 @@ $262.agent.broadcast(i32a.buffer);
 $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
 
 // Try to yield control to ensure the agent actually started to wait. If we
-// don't, we risk sending the wakeup before agents are sleeping, and we hang.
+// don't, we risk sending the notification before agents are sleeping, and we hang.
 $262.agent.tryYield();
 
-// Wake all waiting on WAIT_INDEX, should be 3 always, they won't time out.
+// Notify all waiting on WAIT_INDEX, should be 3 always, they won't time out.
 assert.sameValue(
   Atomics.notify(i32a, WAIT_INDEX),
   NUMAGENT,
diff --git a/test/built-ins/Atomics/notify/notify-in-order-one-time.js b/test/built-ins/Atomics/notify/notify-in-order-one-time.js
index b69c653302..ed968417ee 100644
--- a/test/built-ins/Atomics/notify/notify-in-order-one-time.js
+++ b/test/built-ins/Atomics/notify/notify-in-order-one-time.js
@@ -4,7 +4,7 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes agents in the order they are waiting.
+  Test that Atomics.notify notifies agents in the order they are waiting.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
@@ -16,8 +16,8 @@ const RUNNING = SPIN + NUMAGENT;  // Accounting of live agents
 const BUFFER_SIZE = RUNNING + 1;
 
 // Create workers and start them all spinning.  We set atomic slots to make
-// them go into a wait, thus controlling the waiting order.  Then we wake them
-// one by one and observe the wakeup order.
+// them go into a wait, thus controlling the waiting order.  Then we notify them
+// one by one and observe the notification order.
 
 for (var i = 0; i < NUMAGENT; i++) {
   $262.agent.start(`
diff --git a/test/built-ins/Atomics/notify/notify-in-order.js b/test/built-ins/Atomics/notify/notify-in-order.js
index b69c653302..ed968417ee 100644
--- a/test/built-ins/Atomics/notify/notify-in-order.js
+++ b/test/built-ins/Atomics/notify/notify-in-order.js
@@ -4,7 +4,7 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes agents in the order they are waiting.
+  Test that Atomics.notify notifies agents in the order they are waiting.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
@@ -16,8 +16,8 @@ const RUNNING = SPIN + NUMAGENT;  // Accounting of live agents
 const BUFFER_SIZE = RUNNING + 1;
 
 // Create workers and start them all spinning.  We set atomic slots to make
-// them go into a wait, thus controlling the waiting order.  Then we wake them
-// one by one and observe the wakeup order.
+// them go into a wait, thus controlling the waiting order.  Then we notify them
+// one by one and observe the notification order.
 
 for (var i = 0; i < NUMAGENT; i++) {
   $262.agent.start(`
diff --git a/test/built-ins/Atomics/notify/notify-one.js b/test/built-ins/Atomics/notify/notify-one.js
index f026e87a30..ffd29d0214 100644
--- a/test/built-ins/Atomics/notify/notify-one.js
+++ b/test/built-ins/Atomics/notify/notify-one.js
@@ -4,14 +4,14 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes one waiter if that's what the count is.
+  Test that Atomics.notify notifies one waiter if that's what the count is.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
 
 const WAIT_INDEX = 0;             // Agents wait here
 const RUNNING = 1;                // Accounting of live agents here
-const WAKECOUNT = 1;
+const NOTIFYCOUNT = 1;
 const NUMAGENT = 3;
 const BUFFER_SIZE = 4;
 
@@ -42,13 +42,13 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
 // Try to yield control to ensure the agent actually started to wait.
 $262.agent.tryYield();
 
-// There's a slight risk we'll fail to wake the desired count, if the preceding
+// There's a slight risk we'll fail to notify the desired count, if the preceding
 // tryYield() took much longer than anticipated and workers have started timing
 // out.
 assert.sameValue(
-  Atomics.notify(i32a, 0, WAKECOUNT),
-  WAKECOUNT,
-  'Atomics.notify(i32a, 0, WAKECOUNT) returns the value of `WAKECOUNT`'
+  Atomics.notify(i32a, 0, NOTIFYCOUNT),
+  NOTIFYCOUNT,
+  'Atomics.notify(i32a, 0, NOTIFYCOUNT) returns the value of `NOTIFYCOUNT`'
 );
 
 // Try to sleep past the timeout.
@@ -61,9 +61,9 @@ for (var i = 0; i < NUMAGENT; i++) {
 }
 reports.sort();
 
-for (var i = 0; i < WAKECOUNT; i++) {
+for (var i = 0; i < NOTIFYCOUNT; i++) {
   assert.sameValue(reports[i], 'ok', 'The value of reports[i] is "ok"');
 }
-for (var i = WAKECOUNT; i < NUMAGENT; i++) {
+for (var i = NOTIFYCOUNT; i < NUMAGENT; i++) {
   assert.sameValue(reports[i], 'timed-out', 'The value of reports[i] is "timed-out"');
 }
diff --git a/test/built-ins/Atomics/notify/notify-two.js b/test/built-ins/Atomics/notify/notify-two.js
index 4d4cd8328d..2a8d6fb8d1 100644
--- a/test/built-ins/Atomics/notify/notify-two.js
+++ b/test/built-ins/Atomics/notify/notify-two.js
@@ -4,14 +4,14 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes two waiters if that's what the count is.
+  Test that Atomics.notify notifies two waiters if that's what the count is.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
 
 const WAIT_INDEX = 0;             // Agents wait here
 const RUNNING = 1;                // Accounting of live agents here
-const WAKECOUNT = 2;
+const NOTIFYCOUNT = 2;
 const NUMAGENT = 3;
 const BUFFER_SIZE = 4;
 
@@ -42,13 +42,13 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
 // Try to yield control to ensure the agent actually started to wait.
 $262.agent.tryYield();
 
-// There's a slight risk we'll fail to wake the desired count, if the preceding
+// There's a slight risk we'll fail to notify the desired count, if the preceding
 // tryYield() took much longer than anticipated and workers have started timing
 // out.
 assert.sameValue(
-  Atomics.notify(i32a, 0, WAKECOUNT),
-  WAKECOUNT,
-  'Atomics.notify(i32a, 0, WAKECOUNT) returns the value of `WAKECOUNT`'
+  Atomics.notify(i32a, 0, NOTIFYCOUNT),
+  NOTIFYCOUNT,
+  'Atomics.notify(i32a, 0, NOTIFYCOUNT) returns the value of `NOTIFYCOUNT`'
 );
 
 // Try to sleep past the timeout.
@@ -61,9 +61,9 @@ for (var i = 0; i < NUMAGENT; i++) {
 }
 reports.sort();
 
-for (var i = 0; i < WAKECOUNT; i++) {
+for (var i = 0; i < NOTIFYCOUNT; i++) {
   assert.sameValue(reports[i], 'ok', 'The value of reports[i] is "ok"');
 }
-for (var i = WAKECOUNT; i < NUMAGENT; i++) {
+for (var i = NOTIFYCOUNT; i < NUMAGENT; i++) {
   assert.sameValue(reports[i], 'timed-out', 'The value of reports[i] is "timed-out"');
 }
diff --git a/test/built-ins/Atomics/notify/notify-with-no-agents-waiting.js b/test/built-ins/Atomics/notify/notify-with-no-agents-waiting.js
index 4a3a73412c..747e01766b 100644
--- a/test/built-ins/Atomics/notify/notify-with-no-agents-waiting.js
+++ b/test/built-ins/Atomics/notify/notify-with-no-agents-waiting.js
@@ -4,7 +4,7 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes zero waiters if there are no agents waiting.
+  Test that Atomics.notify notifies zero waiters if there are no agents waiting.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
@@ -27,5 +27,5 @@ const i32a = new Int32Array(
 $262.agent.broadcast(i32a.buffer);
 $262.agent.waitUntil(i32a, RUNNING, 1);
 
-// There are ZERO agents waiting to wake...
+// There are ZERO agents waiting to notify...
 assert.sameValue(Atomics.notify(i32a, 0, 1), 0, 'Atomics.notify(i32a, 0, 1) returns 0');
diff --git a/test/built-ins/Atomics/notify/notify-with-no-matching-agents-waiting.js b/test/built-ins/Atomics/notify/notify-with-no-matching-agents-waiting.js
index fc9523849b..b4a247e493 100644
--- a/test/built-ins/Atomics/notify/notify-with-no-matching-agents-waiting.js
+++ b/test/built-ins/Atomics/notify/notify-with-no-matching-agents-waiting.js
@@ -4,7 +4,7 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes zero waiters if there are no waiters
+  Test that Atomics.notify notifies zero waiters if there are no waiters
   at the index specified.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
diff --git a/test/built-ins/Atomics/notify/notify-zero.js b/test/built-ins/Atomics/notify/notify-zero.js
index e5a6cc9072..615cb6b91c 100644
--- a/test/built-ins/Atomics/notify/notify-zero.js
+++ b/test/built-ins/Atomics/notify/notify-zero.js
@@ -4,14 +4,14 @@
 /*---
 esid: sec-atomics.notify
 description: >
-  Test that Atomics.notify wakes zero waiters if that's what the count is.
+  Test that Atomics.notify notifies zero waiters if that's what the count is.
 includes: [atomicsHelper.js]
 features: [Atomics, SharedArrayBuffer, TypedArray]
 ---*/
 
 const WAIT_INDEX = 0;             // Agents wait here
 const RUNNING = 1;                // Accounting of live agents here
-const WAKECOUNT = 0;
+const NOTIFYCOUNT = 0;
 const NUMAGENT = 3;
 const BUFFER_SIZE = 4;
 
@@ -43,9 +43,9 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
 $262.agent.tryYield();
 
 assert.sameValue(
-  Atomics.notify(i32a, WAIT_INDEX, WAKECOUNT),
-  WAKECOUNT,
-  'Atomics.notify(i32a, WAIT_INDEX, WAKECOUNT) returns the value of `WAKECOUNT`'
+  Atomics.notify(i32a, WAIT_INDEX, NOTIFYCOUNT),
+  NOTIFYCOUNT,
+  'Atomics.notify(i32a, WAIT_INDEX, NOTIFYCOUNT) returns the value of `NOTIFYCOUNT`'
 );
 
 // Try to sleep past the timeout.
diff --git a/test/built-ins/Atomics/notify/undefined-index-defaults-to-zero.js b/test/built-ins/Atomics/notify/undefined-index-defaults-to-zero.js
index 922efe4c46..3dfe88b2e9 100644
--- a/test/built-ins/Atomics/notify/undefined-index-defaults-to-zero.js
+++ b/test/built-ins/Atomics/notify/undefined-index-defaults-to-zero.js
@@ -58,14 +58,14 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
 // Try to yield control to ensure the agents actually started to wait.
 $262.agent.tryYield();
 
-// Wake at index 0, undefined => 0.
+// Notify at index 0, undefined => 0.
 var woken = 0;
 while ((woken = Atomics.notify(i32a, undefined, 1)) === 0) ;
 assert.sameValue(woken, 1, 'Atomics.notify(i32a, undefined, 1) returns 1');
 
 assert.sameValue($262.agent.getReport(), 'ok', '$262.agent.getReport() returns "ok"');
 
-// Wake again at index 0, default => 0.
+// Notify again at index 0, default => 0.
 var woken = 0;
 while ((woken = Atomics.notify(i32a, /*, default values used */)) === 0) ;
 assert.sameValue(woken, 1, 'Atomics.notify(i32a /*, default values used */) returns 1');
-- 
GitLab