| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 // Lower bounds are considered approximate, correct as necessary. | 553 // Lower bounds are considered approximate, correct as necessary. |
| 554 t = Type::Intersect(t, b.upper, region); | 554 t = Type::Intersect(t, b.upper, region); |
| 555 TypeHandle lower = Type::Union(b.lower, t, region); | 555 TypeHandle lower = Type::Union(b.lower, t, region); |
| 556 return BoundsImpl(lower, b.upper); | 556 return BoundsImpl(lower, b.upper); |
| 557 } | 557 } |
| 558 static BoundsImpl NarrowUpper(BoundsImpl b, TypeHandle t, Region* region) { | 558 static BoundsImpl NarrowUpper(BoundsImpl b, TypeHandle t, Region* region) { |
| 559 TypeHandle lower = Type::Intersect(b.lower, t, region); | 559 TypeHandle lower = Type::Intersect(b.lower, t, region); |
| 560 TypeHandle upper = Type::Intersect(b.upper, t, region); | 560 TypeHandle upper = Type::Intersect(b.upper, t, region); |
| 561 return BoundsImpl(lower, upper); | 561 return BoundsImpl(lower, upper); |
| 562 } | 562 } |
| 563 |
| 564 bool Narrows(BoundsImpl that) { |
| 565 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
| 566 } |
| 563 }; | 567 }; |
| 564 | 568 |
| 565 typedef BoundsImpl<ZoneTypeConfig> Bounds; | 569 typedef BoundsImpl<ZoneTypeConfig> Bounds; |
| 566 | 570 |
| 567 | 571 |
| 568 } } // namespace v8::internal | 572 } } // namespace v8::internal |
| 569 | 573 |
| 570 #endif // V8_TYPES_H_ | 574 #endif // V8_TYPES_H_ |
| OLD | NEW |