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

Unified Diff: src/collection.js

Issue 1067933002: Use NumberIsNaN in collections.js and make it inlined (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index 928670c3ae39c6c99e3baaee220ff3f8b2dfdf7d..7bb2393a7da32fb4a10251792b276589185e0100 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -25,7 +25,7 @@ function HashToEntry(table, hash, numBuckets) {
function SetFindEntry(table, numBuckets, key, hash) {
- var keyIsNaN = IS_NUMBER(key) && NUMBER_IS_NAN(key);
+ var keyIsNaN = NumberIsNaN(key);
for (var entry = HashToEntry(table, hash, numBuckets);
entry !== NOT_FOUND;
entry = ORDERED_HASH_SET_CHAIN_AT(table, entry, numBuckets)) {
@@ -33,7 +33,7 @@ function SetFindEntry(table, numBuckets, key, hash) {
if (key === candidate) {
return entry;
}
- if (keyIsNaN && IS_NUMBER(candidate) && NUMBER_IS_NAN(candidate)) {
+ if (keyIsNaN && NumberIsNaN(candidate)) {
return entry;
}
}
@@ -43,7 +43,7 @@ function SetFindEntry(table, numBuckets, key, hash) {
function MapFindEntry(table, numBuckets, key, hash) {
- var keyIsNaN = IS_NUMBER(key) && NUMBER_IS_NAN(key);
+ var keyIsNaN = NumberIsNaN(key);
for (var entry = HashToEntry(table, hash, numBuckets);
entry !== NOT_FOUND;
entry = ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets)) {
@@ -51,7 +51,7 @@ function MapFindEntry(table, numBuckets, key, hash) {
if (key === candidate) {
return entry;
}
- if (keyIsNaN && IS_NUMBER(candidate) && NUMBER_IS_NAN(candidate)) {
+ if (keyIsNaN && NumberIsNaN(candidate)) {
return entry;
}
}
« no previous file with comments | « no previous file | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698