Narrows predicate for type bounds
authorrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 19 Feb 2014 10:52:06 +0000 (10:52 +0000)
committerrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 19 Feb 2014 10:52:06 +0000 (10:52 +0000)
R=danno@chromium.org
BUG=

Review URL: https://codereview.chromium.org/170943005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/types.h

index 99a809d..48b3933 100644 (file)
@@ -560,6 +560,10 @@ struct BoundsImpl {
     TypeHandle upper = Type::Intersect(b.upper, t, region);
     return BoundsImpl(lower, upper);
   }
+
+  bool Narrows(BoundsImpl that) {
+    return that.lower->Is(this->lower) && this->upper->Is(that.upper);
+  }
 };
 
 typedef BoundsImpl<ZoneTypeConfig> Bounds;