Mercurial > hg > graal-compiler
changeset 22829:a60600b1221f
TraceRA: TraceInterval: use setFrom and setTo.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Thu, 08 Oct 2015 15:14:48 +0200 |
parents | 259702025588 |
children | fa48dd0537cd |
files | graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceInterval.java |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceInterval.java Thu Oct 08 15:18:22 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/trace/TraceInterval.java Thu Oct 08 15:14:48 2015 +0200 @@ -437,7 +437,13 @@ return intFrom == Integer.MAX_VALUE && intTo == Integer.MAX_VALUE; } + public void setTo(int pos) { + assert intFrom == Integer.MAX_VALUE || intFrom < pos; + intTo = pos; + } + public void setFrom(int pos) { + assert intTo == Integer.MAX_VALUE || pos < intTo; intFrom = pos; } @@ -892,10 +898,10 @@ assert from < to : "invalid range"; if (from < intFrom) { - intFrom = from; + setFrom(from); } if (intTo == Integer.MAX_VALUE || intTo < to) { - intTo = to; + setTo(to); } } @@ -942,8 +948,8 @@ TraceInterval result = newSplitChild(allocator); // split the ranges - result.intTo = intTo; - result.intFrom = splitPos; + result.setTo(intTo); + result.setFrom(splitPos); intTo = splitPos; // split list of use positions