diff graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/LinearScanWalker.java @ 4142:bc8527f3071c

Adjust code base to new level of warnings.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sun, 18 Dec 2011 05:24:06 +0100
parents e233f5660da4
children a47535c91bf1
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/LinearScanWalker.java	Sun Dec 18 05:23:52 2011 +0100
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/alloc/LinearScanWalker.java	Sun Dec 18 05:24:06 2011 +0100
@@ -68,7 +68,7 @@
         moveResolver = new MoveResolver(allocator);
         spillIntervals = Util.uncheckedCast(new List[allocator.registers.length]);
         for (int i = 0; i < allocator.registers.length; i++) {
-            spillIntervals[i] = new ArrayList<Interval>(2);
+            spillIntervals[i] = new ArrayList<>(2);
         }
         usePos = new int[allocator.registers.length];
         blockPos = new int[allocator.registers.length];
@@ -220,11 +220,11 @@
         }
     }
 
-    void insertMove(int opId, Interval srcIt, Interval dstIt) {
+    void insertMove(int operandId, Interval srcIt, Interval dstIt) {
         // output all moves here. When source and target are equal, the move is
         // optimized away later in assignRegNums
 
-        opId = (opId + 1) & ~1;
+        int opId = (operandId + 1) & ~1;
         LIRBlock opBlock = allocator.blockForId(opId);
         assert opId > 0 && allocator.blockForId(opId - 2) == opBlock : "cannot insert move at block boundary";
 
@@ -432,7 +432,7 @@
         allocator.copyRegisterFlags(interval, splitPart);
         splitPart.setInsertMoveWhenActivated(moveNecessary);
 
-        assert splitPart.from() >= current.currentFrom() : "cannot append new interval before current walk position";
+        assert splitPart.from() >= currentInterval.currentFrom() : "cannot append new interval before current walk position";
         unhandledLists.addToListSortedByStartAndUsePositions(RegisterBinding.Any, splitPart);
 
         if (GraalOptions.TraceLinearScanLevel >= 2) {
@@ -607,7 +607,7 @@
         }
 
         CiRegister hint = null;
-        Interval locationHint = interval.locationHint(true, allocator);
+        Interval locationHint = interval.locationHint(true);
         if (locationHint != null && locationHint.location() != null && locationHint.location().isRegister()) {
             hint = locationHint.location().asRegister();
             if (GraalOptions.TraceLinearScanLevel >= 4) {
@@ -826,7 +826,7 @@
         }
     }
 
-    boolean isMove(LIRInstruction op, Interval from, Interval to) {
+    static boolean isMove(LIRInstruction op, Interval from, Interval to) {
         if (op.code != StandardOpcode.MOVE) {
             return false;
         }
@@ -844,7 +844,7 @@
             return;
         }
 
-        Interval registerHint = interval.locationHint(false, allocator);
+        Interval registerHint = interval.locationHint(false);
         if (registerHint == null) {
             // cur is not the target of a move : otherwise registerHint would be set
             return;
@@ -897,7 +897,7 @@
     // allocate a physical register or memory location to an interval
     @Override
     boolean activateCurrent() {
-        Interval interval = current;
+        Interval interval = currentInterval;
         boolean result = true;
 
         if (GraalOptions.TraceLinearScanLevel >= 2) {