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

Unified Diff: src/harmony-atomics.js

Issue 1390023003: Use simple/fast macro version of MinMax in JS (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: avoid debug directory Created 5 years, 2 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/harmony-array.js ('k') | src/harmony-typedarray.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-atomics.js
diff --git a/src/harmony-atomics.js b/src/harmony-atomics.js
index 7412494e30368e9e984174f72b642aa97ed3f7d7..e06008a16dd29d5483947904abdfa8db3a22f5c7 100644
--- a/src/harmony-atomics.js
+++ b/src/harmony-atomics.js
@@ -12,13 +12,8 @@
// Imports
var GlobalObject = global.Object;
-var MathMax;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
-utils.Import(function(from) {
- MathMax = from.MathMax;
-});
-
// -------------------------------------------------------------------
@@ -146,7 +141,7 @@ function AtomicsFutexWaitJS(ia, index, value, timeout) {
if (NUMBER_IS_NAN(timeout)) {
timeout = INFINITY;
} else {
- timeout = MathMax(0, timeout);
+ timeout = MAX_SIMPLE(0, timeout);
}
}
return %AtomicsFutexWait(ia, index, value, timeout);
@@ -158,14 +153,14 @@ function AtomicsFutexWakeJS(ia, index, count) {
if (index < 0 || index >= %_TypedArrayGetLength(ia)) {
return UNDEFINED;
}
- count = MathMax(0, TO_INTEGER(count));
+ count = MAX_SIMPLE(0, TO_INTEGER(count));
Michael Starzinger 2015/10/07 19:02:23 I don't have a machine where I could verify this r
return %AtomicsFutexWake(ia, index, count);
}
function AtomicsFutexWakeOrRequeueJS(ia, index1, count, value, index2) {
CheckSharedInteger32TypedArray(ia);
index1 = TO_INTEGER(index1);
- count = MathMax(0, TO_INTEGER(count));
+ count = MAX_SIMPLE(0, TO_INTEGER(count));
Michael Starzinger 2015/10/07 19:02:23 Likewise.
value = TO_INT32(value);
index2 = TO_INTEGER(index2);
if (index1 < 0 || index1 >= %_TypedArrayGetLength(ia) ||
« no previous file with comments | « src/harmony-array.js ('k') | src/harmony-typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698