| Index: src/harmony-atomics.js
|
| diff --git a/src/harmony-atomics.js b/src/harmony-atomics.js
|
| index 52180f9bdd45490153b18bdc360e8ae53226dbfe..b1b529fe866aeb42ee9d9b62152b20e2250d67eb 100644
|
| --- a/src/harmony-atomics.js
|
| +++ b/src/harmony-atomics.js
|
| @@ -41,7 +41,7 @@ function CheckSharedInteger32TypedArray(ia) {
|
|
|
| function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) {
|
| CheckSharedIntegerTypedArray(sta);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
|
| return UNDEFINED;
|
| }
|
| @@ -52,7 +52,7 @@ function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) {
|
|
|
| function AtomicsLoadJS(sta, index) {
|
| CheckSharedIntegerTypedArray(sta);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
|
| return UNDEFINED;
|
| }
|
| @@ -61,7 +61,7 @@ function AtomicsLoadJS(sta, index) {
|
|
|
| function AtomicsStoreJS(sta, index, value) {
|
| CheckSharedIntegerTypedArray(sta);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
|
| return UNDEFINED;
|
| }
|
| @@ -71,7 +71,7 @@ function AtomicsStoreJS(sta, index, value) {
|
|
|
| function AtomicsAddJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| @@ -81,7 +81,7 @@ function AtomicsAddJS(ia, index, value) {
|
|
|
| function AtomicsSubJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| @@ -91,7 +91,7 @@ function AtomicsSubJS(ia, index, value) {
|
|
|
| function AtomicsAndJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| @@ -101,7 +101,7 @@ function AtomicsAndJS(ia, index, value) {
|
|
|
| function AtomicsOrJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| @@ -111,7 +111,7 @@ function AtomicsOrJS(ia, index, value) {
|
|
|
| function AtomicsXorJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| @@ -121,7 +121,7 @@ function AtomicsXorJS(ia, index, value) {
|
|
|
| function AtomicsExchangeJS(ia, index, value) {
|
| CheckSharedIntegerTypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| @@ -137,7 +137,7 @@ function AtomicsIsLockFreeJS(size) {
|
|
|
| function AtomicsFutexWaitJS(ia, index, value, timeout) {
|
| CheckSharedInteger32TypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| @@ -156,20 +156,20 @@ function AtomicsFutexWaitJS(ia, index, value, timeout) {
|
|
|
| function AtomicsFutexWakeJS(ia, index, count) {
|
| CheckSharedInteger32TypedArray(ia);
|
| - index = $toInteger(index);
|
| + index = TO_INTEGER(index);
|
| if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
| }
|
| - count = MathMax(0, $toInteger(count));
|
| + count = MathMax(0, TO_INTEGER(count));
|
| return %AtomicsFutexWake(ia, index, count);
|
| }
|
|
|
| function AtomicsFutexWakeOrRequeueJS(ia, index1, count, value, index2) {
|
| CheckSharedInteger32TypedArray(ia);
|
| - index1 = $toInteger(index1);
|
| - count = MathMax(0, $toInteger(count));
|
| + index1 = TO_INTEGER(index1);
|
| + count = MathMax(0, TO_INTEGER(count));
|
| value = TO_INT32(value);
|
| - index2 = $toInteger(index2);
|
| + index2 = TO_INTEGER(index2);
|
| if (index1 < 0 || index1 >= %_TypedArrayGetLength(ia) ||
|
| index2 < 0 || index2 >= %_TypedArrayGetLength(ia)) {
|
| return UNDEFINED;
|
|
|