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

Unified Diff: src/compiler/typer.cc

Issue 2077533002: [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Import tests from Raymond. 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
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 7caf16dff9499d80c5dcde6b7cba3fb0bd454a7e..7826e1703c7d809416a44170539aeca8967b511f 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1543,9 +1543,10 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
case kMathTrunc:
return t->cache_.kIntegerOrMinusZeroOrNaN;
// Unary math functions.
+ case kMathExp:
+ return Type::Union(Type::PlainNumber(), Type::NaN(), t->zone());
case kMathAbs:
case kMathLog:
- case kMathExp:
case kMathSqrt:
case kMathCos:
case kMathSin:
@@ -1800,6 +1801,10 @@ Type* Typer::Visitor::TypeNumberAtan(Node* node) { return Type::Number(); }
Type* Typer::Visitor::TypeNumberAtan2(Node* node) { return Type::Number(); }
+Type* Typer::Visitor::TypeNumberExp(Node* node) {
+ return Type::Union(Type::PlainNumber(), Type::NaN(), zone());
+}
+
Type* Typer::Visitor::TypeNumberLog(Node* node) { return Type::Number(); }
Type* Typer::Visitor::TypeNumberLog1p(Node* node) { return Type::Number(); }
@@ -2559,6 +2564,8 @@ Type* Typer::Visitor::TypeFloat64Atan(Node* node) { return Type::Number(); }
Type* Typer::Visitor::TypeFloat64Atan2(Node* node) { return Type::Number(); }
+Type* Typer::Visitor::TypeFloat64Exp(Node* node) { return Type::Number(); }
+
Type* Typer::Visitor::TypeFloat64Log(Node* node) { return Type::Number(); }
Type* Typer::Visitor::TypeFloat64Log1p(Node* node) { return Type::Number(); }

Powered by Google App Engine
This is Rietveld 408576698