# HG changeset patch # User Josef Eisl # Date 1400780522 -7200 # Node ID 5d734275cc5f88cc8f95029e0591a912d2909d84 # Parent a7fd7fee9d402e6c24adc26177b0d870a0a221cd LSRA: make IntervalWalker.currentInterval private. diff -r a7fd7fee9d40 -r 5d734275cc5f graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java Thu May 22 23:02:46 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java Thu May 22 19:42:02 2014 +0200 @@ -51,7 +51,7 @@ /** * The current interval (taken from the unhandled list) being processed. */ - protected Interval currentInterval; + private Interval currentInterval; /** * The current position (intercept point through the intervals). @@ -64,14 +64,12 @@ protected RegisterBinding currentBinding; /** - * Processes the {@linkplain #currentInterval} interval in an attempt to allocate a physical - * register to it and thus allow it to be moved to a list of {@linkplain #activeLists active} - * intervals. + * Processes the {@code currentInterval} interval in an attempt to allocate a physical register + * to it and thus allow it to be moved to a list of {@linkplain #activeLists active} intervals. * - * @return {@code true} if a register was allocated to the {@linkplain #currentInterval} - * interval + * @return {@code true} if a register was allocated to the {@code currentInterval} interval */ - protected boolean activateCurrent() { + protected boolean activateCurrent(@SuppressWarnings({"unused", "hiding"}) Interval currentInterval) { return true; } @@ -217,7 +215,7 @@ if (isActive) { try (Indent indent = Debug.logAndIndent("walk to op %d", opId)) { currentInterval.state = State.Active; - if (activateCurrent()) { + if (activateCurrent(currentInterval)) { activeLists.addToListSortedByCurrentFromPositions(currentBinding, currentInterval); intervalMoved(currentInterval, State.Unhandled, State.Active); } diff -r a7fd7fee9d40 -r 5d734275cc5f graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Thu May 22 23:02:46 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Thu May 22 19:42:02 2014 +0200 @@ -430,7 +430,7 @@ splitPart.setInsertMoveWhenActivated(moveNecessary); - assert splitPart.from() >= currentInterval.currentFrom() : "cannot append new interval before current walk position"; + assert splitPart.from() >= currentPosition : "cannot append new interval before current walk position"; unhandledLists.addToListSortedByStartAndUsePositions(RegisterBinding.Any, splitPart); if (Debug.isLogEnabled()) { @@ -836,8 +836,7 @@ // allocate a physical register or memory location to an interval @Override - protected boolean activateCurrent() { - Interval interval = currentInterval; + protected boolean activateCurrent(Interval interval) { boolean result = true; try (Indent indent = Debug.logAndIndent("activating interval %s, splitParent: %d", interval, interval.splitParent().operandNumber)) {