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

Unified Diff: src/compiler/typer.cc

Issue 840953003: [turbofan] Correctify representation changes to bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: std::isnan Created 5 years, 11 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-reducer.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 137829e92d9bb1b077fc31b10b4fa14e6b6c181c..1fcfa17de9a4b920a30e7ead291e7921d5d1c10b 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1596,6 +1596,14 @@ Bounds Typer::Visitor::TypeChangeFloat64ToTagged(Node* node) {
}
+Bounds Typer::Visitor::TypeChangeBitToBool(Node* node) {
+ Bounds arg = Operand(node, 0);
+ // TODO(neis): DCHECK(arg.upper->Is(Type::Boolean()));
+ return Bounds(ChangeRepresentation(arg.lower, Type::TaggedPointer(), zone()),
+ ChangeRepresentation(arg.upper, Type::TaggedPointer(), zone()));
+}
+
+
Bounds Typer::Visitor::TypeChangeBoolToBit(Node* node) {
Bounds arg = Operand(node, 0);
// TODO(neis): DCHECK(arg.upper->Is(Type::Boolean()));
@@ -1605,12 +1613,15 @@ Bounds Typer::Visitor::TypeChangeBoolToBit(Node* node) {
}
-Bounds Typer::Visitor::TypeChangeBitToBool(Node* node) {
- Bounds arg = Operand(node, 0);
- // TODO(neis): DCHECK(arg.upper->Is(Type::Boolean()));
+Bounds Typer::Visitor::TypeChangeWord32ToBit(Node* node) {
+ return Bounds(
+ ChangeRepresentation(Type::Boolean(), Type::UntaggedBit(), zone()));
+}
+
+
+Bounds Typer::Visitor::TypeChangeWord64ToBit(Node* node) {
return Bounds(
- ChangeRepresentation(arg.lower, Type::TaggedPointer(), zone()),
- ChangeRepresentation(arg.upper, Type::TaggedPointer(), zone()));
+ ChangeRepresentation(Type::Boolean(), Type::UntaggedBit(), zone()));
}
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698