# HG changeset patch # User Josef Eisl # Date 1400792566 -7200 # Node ID a7fd7fee9d402e6c24adc26177b0d870a0a221cd # Parent dd863084c7ad4e038a4b1dbadb756be76be412b2 LSRA: restrict access to IntervalWalker members. diff -r dd863084c7ad -r a7fd7fee9d40 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 Mon May 26 13:37:21 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java Thu May 22 23:02:46 2014 +0200 @@ -36,17 +36,17 @@ /** * Sorted list of intervals, not live before the current position. */ - RegisterBindingLists unhandledLists; + protected RegisterBindingLists unhandledLists; /** * Sorted list of intervals, live at the current position. */ - RegisterBindingLists activeLists; + protected RegisterBindingLists activeLists; /** * Sorted list of intervals in a life time hole at the current position. */ - RegisterBindingLists inactiveLists; + protected RegisterBindingLists inactiveLists; /** * The current interval (taken from the unhandled list) being processed. @@ -67,11 +67,11 @@ * 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. - * + * * @return {@code true} if a register was allocated to the {@linkplain #currentInterval} * interval */ - boolean activateCurrent() { + protected boolean activateCurrent() { return true; } @@ -85,7 +85,7 @@ /** * Creates a new interval walker. - * + * * @param allocator the register allocator context * @param unhandledFixed the list of unhandled {@linkplain RegisterBinding#Fixed fixed} * intervals @@ -103,7 +103,7 @@ nextInterval(); } - void removeFromList(Interval interval) { + protected void removeFromList(Interval interval) { if (interval.state == State.Active) { activeLists.remove(RegisterBinding.Any, interval); } else { @@ -112,7 +112,7 @@ } } - void walkTo(State state, int from) { + private void walkTo(State state, int from) { assert state == State.Active || state == State.Inactive : "wrong state"; for (RegisterBinding binding : RegisterBinding.VALUES) { Interval prevprev = null; @@ -176,7 +176,7 @@ } } - void nextInterval() { + private void nextInterval() { RegisterBinding binding; Interval any = unhandledLists.any; Interval fixed = unhandledLists.fixed; @@ -201,7 +201,7 @@ currentInterval.rewindRange(); } - void walkTo(int toOpId) { + protected void walkTo(int toOpId) { assert currentPosition <= toOpId : "can not walk backwards"; while (currentInterval != null) { boolean isActive = currentInterval.from() <= toOpId; diff -r dd863084c7ad -r a7fd7fee9d40 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 Mon May 26 13:37:21 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java Thu May 22 23:02:46 2014 +0200 @@ -836,7 +836,7 @@ // allocate a physical register or memory location to an interval @Override - boolean activateCurrent() { + protected boolean activateCurrent() { Interval interval = currentInterval; boolean result = true;