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

Unified Diff: src/compiler/typer.cc

Issue 1919513002: [turbofan] Introduce TruncateTaggedToWord32 simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 00f250a504fed61e726e069e40affee54f2bb01e..7957425cda17ff30dff2757125953078a1fadba8 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1915,6 +1915,11 @@ Type* Typer::Visitor::TypeChangeBitToBool(Node* node) {
return ChangeRepresentation(arg, Type::TaggedPointer(), zone());
}
+Type* Typer::Visitor::TypeTruncateTaggedToWord32(Node* node) {
+ Type* arg = Operand(node, 0);
+ // TODO(neis): DCHECK(arg->Is(Type::Number()));
+ return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone());
+}
Type* Typer::Visitor::TypeAllocate(Node* node) { return Type::TaggedPointer(); }
@@ -2303,9 +2308,9 @@ Type* Typer::Visitor::TypeTruncateFloat64ToFloat32(Node* node) {
return Type::Intersect(Type::Number(), Type::UntaggedFloat32(), zone());
}
-
-Type* Typer::Visitor::TypeTruncateFloat64ToInt32(Node* node) {
- return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
+Type* Typer::Visitor::TypeTruncateFloat64ToWord32(Node* node) {
+ return Type::Intersect(Type::Integral32(), Type::UntaggedIntegral32(),
+ zone());
}
@@ -2313,6 +2318,9 @@ Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) {
return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
}
+Type* Typer::Visitor::TypeRoundFloat64ToInt32(Node* node) {
+ return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
+}
Type* Typer::Visitor::TypeRoundInt32ToFloat32(Node* node) {
return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone());

Powered by Google App Engine
This is Rietveld 408576698