# HG changeset patch # User Josef Eisl # Date 1404307784 -7200 # Node ID eeb9110560798258dd29e39edc64f507d72406d7 # Parent b6e70c59b32d0b2134131db749cc045fd398f605 LinearScan: use InstructionStateProcedure. diff -r b6e70c59b32d -r eeb911056079 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed Jul 02 15:26:28 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Wed Jul 02 15:29:44 2014 +0200 @@ -41,10 +41,10 @@ import com.oracle.graal.debug.*; import com.oracle.graal.debug.Debug.Scope; import com.oracle.graal.lir.*; +import com.oracle.graal.lir.LIRInstruction.InstructionStateProcedure; import com.oracle.graal.lir.LIRInstruction.InstructionValueProcedure; import com.oracle.graal.lir.LIRInstruction.OperandFlag; import com.oracle.graal.lir.LIRInstruction.OperandMode; -import com.oracle.graal.lir.LIRInstruction.StateProcedure; import com.oracle.graal.lir.LIRInstruction.ValueProcedure; import com.oracle.graal.lir.StandardOp.MoveOp; import com.oracle.graal.nodes.*; @@ -1753,6 +1753,13 @@ return operand; } }; + InstructionStateProcedure stateProc = new InstructionStateProcedure() { + + @Override + protected void doState(LIRInstruction op, LIRFrameState state) { + computeDebugInfo(iw, op, state); + } + }; for (int j = 0; j < numInst; j++) { final LIRInstruction op = instructions.get(j); @@ -1784,13 +1791,7 @@ op.forEachOutput(assignProc); // compute reference map and debug information - op.forEachState(new StateProcedure() { - - @Override - protected void doState(LIRFrameState state) { - computeDebugInfo(iw, op, state); - } - }); + op.forEachState(stateProc); // remove useless moves if (move != null) {