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

Unified Diff: src/compiler/typer.cc

Issue 2362173003: [turbofan] Improve representation selection for Smi checking. (Closed)
Patch Set: Address comments 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/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 7db9a05079453b6b227dc70236876abc5878b715..e33b7764567881f149e760262b26a9a58f2b1f87 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1571,6 +1571,16 @@ Type* Typer::Visitor::TypeCheckBounds(Node* node) {
return Type::Range(min, max, zone());
}
+Type* Typer::Visitor::TypeCheckHeapObject(Node* node) {
+ Type* type = Operand(node, 0);
+ return type;
+}
+
+Type* Typer::Visitor::TypeCheckIf(Node* node) {
+ UNREACHABLE();
+ return nullptr;
+}
+
Type* Typer::Visitor::TypeCheckMaps(Node* node) {
UNREACHABLE();
return nullptr;
@@ -1581,24 +1591,14 @@ Type* Typer::Visitor::TypeCheckNumber(Node* node) {
return Type::Intersect(arg, Type::Number(), zone());
}
-Type* Typer::Visitor::TypeCheckString(Node* node) {
+Type* Typer::Visitor::TypeCheckSmi(Node* node) {
Type* arg = Operand(node, 0);
- return Type::Intersect(arg, Type::String(), zone());
+ return Type::Intersect(arg, Type::SignedSmall(), zone());
}
-Type* Typer::Visitor::TypeCheckIf(Node* node) {
- UNREACHABLE();
- return nullptr;
-}
-
-Type* Typer::Visitor::TypeCheckTaggedPointer(Node* node) {
- Type* type = Operand(node, 0);
- return type;
-}
-
-Type* Typer::Visitor::TypeCheckTaggedSigned(Node* node) {
+Type* Typer::Visitor::TypeCheckString(Node* node) {
Type* arg = Operand(node, 0);
- return Type::Intersect(arg, typer_->cache_.kSmi, zone());
+ return Type::Intersect(arg, Type::String(), zone());
}
Type* Typer::Visitor::TypeCheckFloat64Hole(Node* node) {
« 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