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

Unified Diff: src/compiler/typer.cc

Issue 2065953002: [turbofan] Introduce dedicated NumberConvertHoleNaN simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('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 c43483dd409f877ba44e2aa272362853ef8e6db0..3625f5bd034dbc4d5bf1b31816143be3fed3cb1a 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -248,6 +248,7 @@ class Typer::Visitor : public Reducer {
static Type* NumberTrunc(Type*, Typer*);
static Type* NumberToInt32(Type*, Typer*);
static Type* NumberToUint32(Type*, Typer*);
+ static Type* NumberConvertHoleNaN(Type*, Typer*);
static Type* ObjectIsCallable(Type*, Typer*);
static Type* ObjectIsNumber(Type*, Typer*);
@@ -556,6 +557,10 @@ Type* Typer::Visitor::NumberToUint32(Type* type, Typer* t) {
return Type::Unsigned32();
}
+Type* Typer::Visitor::NumberConvertHoleNaN(Type* type, Typer* t) {
+ return Type::Union(type, Type::Undefined(), t->zone());
+}
+
// Type checks.
Type* Typer::Visitor::ObjectIsCallable(Type* type, Typer* t) {
@@ -1813,6 +1818,10 @@ Type* Typer::Visitor::TypeNumberIsHoleNaN(Node* node) {
return Type::Boolean();
}
+Type* Typer::Visitor::TypeNumberConvertHoleNaN(Node* node) {
+ return TypeUnaryOp(node, NumberConvertHoleNaN);
+}
+
// static
Type* Typer::Visitor::ReferenceEqualTyper(Type* lhs, Type* rhs, Typer* t) {
if (lhs->IsConstant() && rhs->Is(lhs)) {
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698