Index: src/harmony-atomics.js |
diff --git a/src/harmony-atomics.js b/src/harmony-atomics.js |
index 96cc2145df7a2926c5e41dcf890b70169746476a..d4e069641a26436a5767af80ee544147e993be92 100644 |
--- a/src/harmony-atomics.js |
+++ b/src/harmony-atomics.js |
@@ -12,11 +12,12 @@ |
// Imports |
var GlobalObject = global.Object; |
- |
var MathMax; |
+var ToNumber; |
utils.Import(function(from) { |
MathMax = from.MathMax; |
+ ToNumber = from.ToNumber; |
}); |
// ------------------------------------------------------------------- |
@@ -49,8 +50,8 @@ function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) { |
if (index < 0 || index >= %_TypedArrayGetLength(sta)) { |
return UNDEFINED; |
} |
- oldValue = $toNumber(oldValue); |
- newValue = $toNumber(newValue); |
+ oldValue = ToNumber(oldValue); |
+ newValue = ToNumber(newValue); |
return %_AtomicsCompareExchange(sta, index, oldValue, newValue); |
} |
@@ -69,7 +70,7 @@ function AtomicsStoreJS(sta, index, value) { |
if (index < 0 || index >= %_TypedArrayGetLength(sta)) { |
return UNDEFINED; |
} |
- value = $toNumber(value); |
+ value = ToNumber(value); |
return %_AtomicsStore(sta, index, value); |
} |
@@ -79,7 +80,7 @@ function AtomicsAddJS(ia, index, value) { |
if (index < 0 || index >= %_TypedArrayGetLength(ia)) { |
return UNDEFINED; |
} |
- value = $toNumber(value); |
+ value = ToNumber(value); |
return %_AtomicsAdd(ia, index, value); |
} |
@@ -89,7 +90,7 @@ function AtomicsSubJS(ia, index, value) { |
if (index < 0 || index >= %_TypedArrayGetLength(ia)) { |
return UNDEFINED; |
} |
- value = $toNumber(value); |
+ value = ToNumber(value); |
return %_AtomicsSub(ia, index, value); |
} |
@@ -99,7 +100,7 @@ function AtomicsAndJS(ia, index, value) { |
if (index < 0 || index >= %_TypedArrayGetLength(ia)) { |
return UNDEFINED; |
} |
- value = $toNumber(value); |
+ value = ToNumber(value); |
return %_AtomicsAnd(ia, index, value); |
} |
@@ -109,7 +110,7 @@ function AtomicsOrJS(ia, index, value) { |
if (index < 0 || index >= %_TypedArrayGetLength(ia)) { |
return UNDEFINED; |
} |
- value = $toNumber(value); |
+ value = ToNumber(value); |
return %_AtomicsOr(ia, index, value); |
} |
@@ -119,7 +120,7 @@ function AtomicsXorJS(ia, index, value) { |
if (index < 0 || index >= %_TypedArrayGetLength(ia)) { |
return UNDEFINED; |
} |
- value = $toNumber(value); |
+ value = ToNumber(value); |
return %_AtomicsXor(ia, index, value); |
} |
@@ -129,7 +130,7 @@ function AtomicsExchangeJS(ia, index, value) { |
if (index < 0 || index >= %_TypedArrayGetLength(ia)) { |
return UNDEFINED; |
} |
- value = $toNumber(value); |
+ value = ToNumber(value); |
return %_AtomicsExchange(ia, index, value); |
} |
@@ -148,7 +149,7 @@ function AtomicsFutexWaitJS(ia, index, value, timeout) { |
if (IS_UNDEFINED(timeout)) { |
timeout = INFINITY; |
} else { |
- timeout = $toNumber(timeout); |
+ timeout = ToNumber(timeout); |
if (NUMBER_IS_NAN(timeout)) { |
timeout = INFINITY; |
} else { |