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

Unified Diff: src/types.h

Issue 170943005: Narrows predicate for type bounds (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index 99a809dc10d06ae5108e2c64667982c867018d0a..48b39335b63dcd5c4da0f468f30afd4efaa409d4 100644
--- a/src/types.h
+++ b/src/types.h
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698