aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/android/tools/r8/ir/regalloc/LiveRange.java
blob: 0d7bb80b072decd61dc5f2a6d4b0b1dd5d9b9382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.ir.regalloc;

class LiveRange {

  public final static LiveRange INFINITE = new LiveRange(0, Integer.MAX_VALUE);

  public int start;  // inclusive
  public int end;  // exclusive

  public LiveRange(int start, int end) {
    this.start = start;
    this.end = end;
  }

  @Override
  public String toString() {
    return "[" + start + ", " + end + "[";
  }

  public boolean isInfinite() {
    return this == INFINITE;
  }
}