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, |
]); |
}) |