changeset 15902:a7fd7fee9d40

LSRA: restrict access to IntervalWalker members.
author Josef Eisl <josef.eisl@jku.at>
date Thu, 22 May 2014 23:02:46 +0200
parents dd863084c7ad
children 5d734275cc5f
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/IntervalWalker.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java
diffstat 2 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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;