Chromium Code Reviews| Index: src/compiler/register-allocator.h |
| diff --git a/src/compiler/register-allocator.h b/src/compiler/register-allocator.h |
| index d6ed0052704024939cdeb154b06210d62a8d7fa1..00d47d15ff4f2a85bd27a42dcddb7635c8e7f19b 100644 |
| --- a/src/compiler/register-allocator.h |
| +++ b/src/compiler/register-allocator.h |
| @@ -46,6 +46,15 @@ class LifetimePosition final { |
| return LifetimePosition(index * kStep + kHalfStep); |
| } |
| + static bool ExistsGapPositionBetween(LifetimePosition pos1, |
| + LifetimePosition pos2) { |
| + if (pos1 > pos2) std::swap(pos1, pos2); |
| + LifetimePosition next(pos1.value_ + 1); |
| + LifetimePosition next_gap = |
|
titzer
2016/03/29 08:12:06
Clearer with an explicit if?
if(next.IsGapPositio
Mircea Trofin
2016/04/18 05:18:37
Done.
|
| + next.IsGapPosition() ? next : next.NextFullStart(); |
| + return next_gap < pos2; |
| + } |
| + |
| // Returns a numeric representation of this lifetime position. |
| int value() const { return value_; } |