Chromium Code Reviews| Index: src/property-details.h |
| diff --git a/src/property-details.h b/src/property-details.h |
| index dc912c8a0566a123eb11d0907eee5bd3f1e9ab0d..6f16b3344e8ca5648892fea9f2cc154b2f14577b 100644 |
| --- a/src/property-details.h |
| +++ b/src/property-details.h |
| @@ -99,16 +99,20 @@ class Representation { |
| static Representation FromKind(Kind kind) { return Representation(kind); } |
| - bool Equals(const Representation& other) { |
| + bool Equals(const Representation& other) const { |
| return kind_ == other.kind_; |
| } |
| - bool is_more_general_than(const Representation& other) { |
| + bool is_more_general_than(const Representation& other) const { |
| ASSERT(kind_ != kExternal); |
| ASSERT(other.kind_ != kExternal); |
| return kind_ > other.kind_; |
| } |
| + bool fits(const Representation& other) const { |
|
danno
2013/05/02 14:26:41
how about "fits_in"? Easier to read e.g. (if this-
Toon Verwaest
2013/05/02 15:15:57
Done.
|
| + return other.is_more_general_than(*this) || other.Equals(*this); |
| + } |
| + |
| Representation generalize(Representation other) { |
| if (is_more_general_than(other)) { |
| return *this; |