Index: src/typing.h |
diff --git a/src/typing.h b/src/typing.h |
index b37a0cba894242bf85ce7ec9b4a22c443a2f406a..ceef9843650a190e091943f02fc3c3a1546620ce 100644 |
--- a/src/typing.h |
+++ b/src/typing.h |
@@ -34,6 +34,7 @@ |
#include "ast.h" |
#include "compiler.h" |
#include "type-info.h" |
+#include "types.h" |
#include "zone.h" |
#include "scopes.h" |
@@ -62,17 +63,11 @@ class AstTyper: public AstVisitor { |
TypeFeedbackOracle* oracle() { return &oracle_; } |
Zone* zone() const { return info_->zone(); } |
- void MergeLowerType(Expression* e, Handle<Type> t) { |
- e->set_lower_type(handle(Type::Union(e->lower_type(), t), isolate_)); |
+ void NarrowType(Expression* e, Bounds b) { |
+ e->set_bounds(Bounds::Both(e->bounds(), b, isolate_)); |
} |
- void MergeUpperType(Expression* e, Handle<Type> t) { |
- e->set_upper_type(handle(Type::Intersect(e->upper_type(), t), isolate_)); |
- } |
- void MergeLowerType(Expression* e, Type* t) { |
- MergeLowerType(e, handle(t, isolate_)); |
- } |
- void MergeUpperType(Expression* e, Type* t) { |
- MergeUpperType(e, handle(t, isolate_)); |
+ void NarrowLowerType(Expression* e, Handle<Type> t) { |
+ e->set_bounds(Bounds::NarrowLower(e->bounds(), t, isolate_)); |
} |
void VisitDeclarations(ZoneList<Declaration*>* declarations); |