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

Unified Diff: src/harmony-atomics.js

Issue 1384443002: [es6] Fix missing bits for full @@toPrimitive support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove useless cctest. Created 5 years, 3 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
Index: src/harmony-atomics.js
diff --git a/src/harmony-atomics.js b/src/harmony-atomics.js
index b1b529fe866aeb42ee9d9b62152b20e2250d67eb..7412494e30368e9e984174f72b642aa97ed3f7d7 100644
--- a/src/harmony-atomics.js
+++ b/src/harmony-atomics.js
@@ -13,12 +13,10 @@
var GlobalObject = global.Object;
var MathMax;
-var ToNumber;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
MathMax = from.MathMax;
- ToNumber = from.ToNumber;
});
// -------------------------------------------------------------------
@@ -45,8 +43,8 @@ function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) {
if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
return UNDEFINED;
}
- oldValue = ToNumber(oldValue);
- newValue = ToNumber(newValue);
+ oldValue = TO_NUMBER(oldValue);
+ newValue = TO_NUMBER(newValue);
return %_AtomicsCompareExchange(sta, index, oldValue, newValue);
}
@@ -65,7 +63,7 @@ function AtomicsStoreJS(sta, index, value) {
if (index < 0 || index >= %_TypedArrayGetLength(sta)) {
return UNDEFINED;
}
- value = ToNumber(value);
+ value = TO_NUMBER(value);
return %_AtomicsStore(sta, index, value);
}
@@ -75,7 +73,7 @@ function AtomicsAddJS(ia, index, value) {
if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
return UNDEFINED;
}
- value = ToNumber(value);
+ value = TO_NUMBER(value);
return %_AtomicsAdd(ia, index, value);
}
@@ -85,7 +83,7 @@ function AtomicsSubJS(ia, index, value) {
if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
return UNDEFINED;
}
- value = ToNumber(value);
+ value = TO_NUMBER(value);
return %_AtomicsSub(ia, index, value);
}
@@ -95,7 +93,7 @@ function AtomicsAndJS(ia, index, value) {
if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
return UNDEFINED;
}
- value = ToNumber(value);
+ value = TO_NUMBER(value);
return %_AtomicsAnd(ia, index, value);
}
@@ -105,7 +103,7 @@ function AtomicsOrJS(ia, index, value) {
if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
return UNDEFINED;
}
- value = ToNumber(value);
+ value = TO_NUMBER(value);
return %_AtomicsOr(ia, index, value);
}
@@ -115,7 +113,7 @@ function AtomicsXorJS(ia, index, value) {
if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
return UNDEFINED;
}
- value = ToNumber(value);
+ value = TO_NUMBER(value);
return %_AtomicsXor(ia, index, value);
}
@@ -125,7 +123,7 @@ function AtomicsExchangeJS(ia, index, value) {
if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
return UNDEFINED;
}
- value = ToNumber(value);
+ value = TO_NUMBER(value);
return %_AtomicsExchange(ia, index, value);
}
@@ -144,7 +142,7 @@ function AtomicsFutexWaitJS(ia, index, value, timeout) {
if (IS_UNDEFINED(timeout)) {
timeout = INFINITY;
} else {
- timeout = ToNumber(timeout);
+ timeout = TO_NUMBER(timeout);
if (NUMBER_IS_NAN(timeout)) {
timeout = INFINITY;
} else {

Powered by Google App Engine
This is Rietveld 408576698