Index: src/compiler/typer.cc |
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc |
index 410a4f1162aefc2da84b651d06cdc2085ed8d6e1..76698a4f64ab90ef861063743f8d5bde329ed502 100644 |
--- a/src/compiler/typer.cc |
+++ b/src/compiler/typer.cc |
@@ -1657,7 +1657,13 @@ Type* Typer::Visitor::TypeStoreElement(Node* node) { |
} |
-Type* Typer::Visitor::TypeObjectIsSmi(Node* node) { return Type::Boolean(); } |
+Type* Typer::Visitor::TypeObjectIsSmi(Node* node) { |
+ Type* arg = Operand(node, 0); |
+ if (arg->Is(Type::None())) return Type::None(); |
+ if (arg->Is(Type::TaggedSigned())) return typer_->singleton_true_; |
+ if (arg->Is(Type::TaggedPointer())) return typer_->singleton_false_; |
+ return Type::Boolean(); |
+} |
// Machine operators. |