Index: src/compiler/typer.cc |
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc |
index 6c80446ce921da7e1906cd4dfe3e74e2bca6ee61..ea20cec83fdbfd2c8a26c483b28c2634e82c63c4 100644 |
--- a/src/compiler/typer.cc |
+++ b/src/compiler/typer.cc |
@@ -557,6 +557,13 @@ Type* Typer::Visitor::TypeEffectSet(Node* node) { |
} |
+Type* Typer::Visitor::TypeGuard(Node* node) { |
+ Type* input_type = Operand(node, 0); |
+ Type* guard_type = OpParameter<Type*>(node); |
+ return Type::Intersect(input_type, guard_type, zone()); |
+} |
+ |
+ |
Type* Typer::Visitor::TypeBeginRegion(Node* node) { |
UNREACHABLE(); |
return nullptr; |
@@ -1786,6 +1793,15 @@ Type* Typer::Visitor::TypeStoreElement(Node* node) { |
} |
+Type* Typer::Visitor::TypeObjectIsNumber(Node* node) { |
+ Type* arg = Operand(node, 0); |
+ if (arg->Is(Type::None())) return Type::None(); |
+ if (arg->Is(Type::Number())) return typer_->singleton_true_; |
+ if (!arg->Maybe(Type::Number())) return typer_->singleton_false_; |
+ return Type::Boolean(); |
+} |
+ |
+ |
Type* Typer::Visitor::TypeObjectIsSmi(Node* node) { |
Type* arg = Operand(node, 0); |
if (arg->Is(Type::None())) return Type::None(); |