Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1789)

Unified Diff: src/js/harmony-atomics.js

Issue 2143443002: [Atomics] Rename Atomics.futex*, remove Atomics.futexWakeOrRequeue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-symbols.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/harmony-atomics.js
diff --git a/src/js/harmony-atomics.js b/src/js/harmony-atomics.js
index 8372903b296d8efa6a0f96d5bbf4bd4a1f492abd..5af55c210995acf5cd7f5aa5d1fff34ecd47abac 100644
--- a/src/js/harmony-atomics.js
+++ b/src/js/harmony-atomics.js
@@ -108,9 +108,7 @@ function AtomicsIsLockFreeJS(size) {
return %_AtomicsIsLockFree(size);
}
-// Futexes
-
-function AtomicsFutexWaitJS(ia, index, value, timeout) {
+function AtomicsWaitJS(ia, index, value, timeout) {
CheckSharedInteger32TypedArray(ia);
index = ValidateIndex(index, %_TypedArrayGetLength(ia));
if (IS_UNDEFINED(timeout)) {
@@ -123,27 +121,14 @@ function AtomicsFutexWaitJS(ia, index, value, timeout) {
timeout = MaxSimple(0, timeout);
}
}
- return %AtomicsFutexWait(ia, index, value, timeout);
+ return %AtomicsWait(ia, index, value, timeout);
}
-function AtomicsFutexWakeJS(ia, index, count) {
+function AtomicsWakeJS(ia, index, count) {
CheckSharedInteger32TypedArray(ia);
index = ValidateIndex(index, %_TypedArrayGetLength(ia));
count = MaxSimple(0, TO_INTEGER(count));
- return %AtomicsFutexWake(ia, index, count);
-}
-
-function AtomicsFutexWakeOrRequeueJS(ia, index1, count, value, index2) {
- CheckSharedInteger32TypedArray(ia);
- index1 = ValidateIndex(index1, %_TypedArrayGetLength(ia));
- count = MaxSimple(0, TO_INTEGER(count));
- value = TO_INT32(value);
- index2 = ValidateIndex(index2, %_TypedArrayGetLength(ia));
- if (index1 < 0 || index1 >= %_TypedArrayGetLength(ia) ||
- index2 < 0 || index2 >= %_TypedArrayGetLength(ia)) {
- return UNDEFINED;
- }
- return %AtomicsFutexWakeOrRequeue(ia, index1, count, value, index2);
+ return %AtomicsWake(ia, index, count);
}
// -------------------------------------------------------------------
@@ -154,13 +139,6 @@ var Atomics = global.Atomics;
%AddNamedProperty(Atomics, toStringTagSymbol, "Atomics", READ_ONLY | DONT_ENUM);
-// These must match the values in src/futex-emulation.h
-utils.InstallConstants(Atomics, [
- "OK", 0,
- "NOTEQUAL", -1,
- "TIMEDOUT", -2,
-]);
-
utils.InstallFunctions(Atomics, DONT_ENUM, [
// TODO(binji): remove the rest of the (non futex) Atomics functions as they
// become builtins.
@@ -172,9 +150,8 @@ utils.InstallFunctions(Atomics, DONT_ENUM, [
"xor", AtomicsXorJS,
"exchange", AtomicsExchangeJS,
"isLockFree", AtomicsIsLockFreeJS,
- "futexWait", AtomicsFutexWaitJS,
- "futexWake", AtomicsFutexWakeJS,
- "futexWakeOrRequeue", AtomicsFutexWakeOrRequeueJS,
+ "wait", AtomicsWaitJS,
+ "wake", AtomicsWakeJS,
]);
})
« no previous file with comments | « src/heap-symbols.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698