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

Unified Diff: src/js/collection.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/compiler/typer.cc ('k') | src/js/i18n.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/collection.js
diff --git a/src/js/collection.js b/src/js/collection.js
index 83763af860bdbd2ae2cea40e1e0ddabb570765f4..6fe880d91392e39698d531e95e7506c95fdb07fb 100644
--- a/src/js/collection.js
+++ b/src/js/collection.js
@@ -16,7 +16,6 @@ var GlobalSet = global.Set;
var hashCodeSymbol = utils.ImportNow("hash_code_symbol");
var MathRandom;
var MapIterator;
-var NumberIsNaN;
var SetIterator;
var speciesSymbol = utils.ImportNow("species_symbol");
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
@@ -24,7 +23,6 @@ var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
MathRandom = from.MathRandom;
MapIterator = from.MapIterator;
- NumberIsNaN = from.NumberIsNaN;
SetIterator = from.SetIterator;
});
@@ -42,9 +40,9 @@ function SetFindEntry(table, numBuckets, key, hash) {
if (entry === NOT_FOUND) return entry;
var candidate = ORDERED_HASH_SET_KEY_AT(table, entry, numBuckets);
if (key === candidate) return entry;
- var keyIsNaN = NumberIsNaN(key);
+ var keyIsNaN = NUMBER_IS_NAN(key);
while (true) {
- if (keyIsNaN && NumberIsNaN(candidate)) {
+ if (keyIsNaN && NUMBER_IS_NAN(candidate)) {
return entry;
}
entry = ORDERED_HASH_SET_CHAIN_AT(table, entry, numBuckets);
@@ -62,9 +60,9 @@ function MapFindEntry(table, numBuckets, key, hash) {
if (entry === NOT_FOUND) return entry;
var candidate = ORDERED_HASH_MAP_KEY_AT(table, entry, numBuckets);
if (key === candidate) return entry;
- var keyIsNaN = NumberIsNaN(key);
+ var keyIsNaN = NUMBER_IS_NAN(key);
while (true) {
- if (keyIsNaN && NumberIsNaN(candidate)) {
+ if (keyIsNaN && NUMBER_IS_NAN(candidate)) {
return entry;
}
entry = ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets);
« no previous file with comments | « src/compiler/typer.cc ('k') | src/js/i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698