Mercurial > hg > truffle
changeset 16355:eeb911056079
LinearScan: use InstructionStateProcedure.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 02 Jul 2014 15:29:44 +0200 |
parents | b6e70c59b32d |
children | 830fd9cd1099 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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) {