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

Unified Diff: src/compiler/typer.cc

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/js-builtin-reducer.cc ('k') | src/js/collection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 9bb0613c71dabe325c88bfe553b2fdf2b0de08b0..50ee2d567c0a37dba6853194c9f25baf04a9adbc 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1340,6 +1340,11 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
case kDateGetTime:
return t->cache_.kJSDateValueType;
// Number functions.
+ case kNumberIsFinite:
+ case kNumberIsInteger:
+ case kNumberIsNaN:
+ case kNumberIsSafeInteger:
+ return Type::Boolean();
case kNumberParseInt:
return t->cache_.kIntegerOrMinusZeroOrNaN;
case kNumberToString:
@@ -1370,6 +1375,9 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
case kGlobalEscape:
case kGlobalUnescape:
return Type::String();
+ case kGlobalIsFinite:
+ case kGlobalIsNaN:
+ return Type::Boolean();
default:
break;
}
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/js/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698