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

Unified Diff: src/js/typedarray.js

Issue 2313073002: [builtins] Migrate Number predicates and make them optimizable. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « src/js/prologue.js ('k') | src/js/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/typedarray.js
diff --git a/src/js/typedarray.js b/src/js/typedarray.js
index fe4bba3ddd9c43b29e014fec697b8602ef5927e9..edb3b06a745875b27f9173dad68209a291c369f8 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -34,7 +34,6 @@ var InnerArraySome;
var InnerArraySort;
var InnerArrayToLocaleString;
var InternalArray = utils.InternalArray;
-var IsNaN;
var MaxSimple;
var MinSimple;
var PackedArrayReverse;
@@ -83,7 +82,6 @@ utils.Import(function(from) {
InnerArraySome = from.InnerArraySome;
InnerArraySort = from.InnerArraySort;
InnerArrayToLocaleString = from.InnerArrayToLocaleString;
- IsNaN = from.IsNaN;
MaxSimple = from.MaxSimple;
MinSimple = from.MinSimple;
PackedArrayReverse = from.PackedArrayReverse;
@@ -544,9 +542,9 @@ function TypedArrayComparefn(x, y) {
return -1;
} else if (x > y) {
return 1;
- } else if (IsNaN(x) && IsNaN(y)) {
- return IsNaN(y) ? 0 : 1;
- } else if (IsNaN(x)) {
+ } else if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) {
+ return NUMBER_IS_NAN(y) ? 0 : 1;
+ } else if (NUMBER_IS_NAN(x)) {
return 1;
}
return 0;
« no previous file with comments | « src/js/prologue.js ('k') | src/js/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698