# HG changeset patch # User Josef Eisl # Date 1411648524 -7200 # Node ID 0578dc1c1a6277294de47fcdee5c92724bb90856 # Parent 0f299d6639440c23df967d9a03efdb84713e9488 Remove ValueProcedure.doValue(Value value). diff -r 0f299d663944 -r 0578dc1c1a62 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java Thu Sep 25 14:32:47 2014 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java Thu Sep 25 14:35:24 2014 +0200 @@ -38,6 +38,8 @@ import com.oracle.graal.debug.*; import com.oracle.graal.debug.Debug.Scope; import com.oracle.graal.lir.*; +import com.oracle.graal.lir.LIRInstruction.OperandFlag; +import com.oracle.graal.lir.LIRInstruction.OperandMode; import com.oracle.graal.lir.StandardOp.MoveOp; import com.oracle.graal.lir.gen.*; import com.oracle.graal.nodes.*; @@ -82,7 +84,7 @@ private ValueProcedure collectStatsProc = new ValueProcedure() { @Override - public Value doValue(Value value) { + public Value doValue(Value value, OperandMode mode, EnumSet flags) { if (ValueUtil.isRegister(value)) { final Register reg = ValueUtil.asRegister(value); registers.add(reg); diff -r 0f299d663944 -r 0578dc1c1a62 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 Thu Sep 25 14:32:47 2014 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java Thu Sep 25 14:35:24 2014 +0200 @@ -926,7 +926,7 @@ ins.forEachState(new ValueProcedure() { @Override - public Value doValue(Value liveStateOperand) { + public Value doValue(Value liveStateOperand, OperandMode mode, EnumSet flags) { Debug.log("operand=%s", liveStateOperand); return liveStateOperand; } @@ -1127,7 +1127,7 @@ op.forEachRegisterHint(targetValue, mode, new ValueProcedure() { @Override - public Value doValue(Value registerHint) { + public Value doValue(Value registerHint, OperandMode valueMode, EnumSet valueFlags) { if (isVariableOrRegister(registerHint)) { Interval from = getOrCreateInterval((AllocatableValue) registerHint); Interval to = getOrCreateInterval((AllocatableValue) targetValue); diff -r 0f299d663944 -r 0578dc1c1a62 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueProcedure.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueProcedure.java Thu Sep 25 14:32:47 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ValueProcedure.java Thu Sep 25 14:35:24 2014 +0200 @@ -25,8 +25,8 @@ import java.util.*; import com.oracle.graal.api.meta.*; -import com.oracle.graal.compiler.common.*; -import com.oracle.graal.lir.LIRInstruction.*; +import com.oracle.graal.lir.LIRInstruction.OperandFlag; +import com.oracle.graal.lir.LIRInstruction.OperandMode; /** * Similar to {@link InstructionValueProcedure} but without an {@link LIRInstruction} parameter. @@ -34,28 +34,14 @@ public abstract class ValueProcedure extends InstructionValueProcedure { /** - * Iterator method to be overwritten. This version of the iterator does not take additional - * parameters to keep the signature short. - * - * @param value The value that is iterated. - * @return The new value to replace the value that was passed in. - */ - public Value doValue(Value value) { - throw GraalInternalError.shouldNotReachHere("One of the doValue() methods must be overwritten"); - } - - /** - * Iterator method to be overwritten. This version of the iterator gets additional parameters - * about the processed value. + * Iterator method to be overwritten. * * @param value The value that is iterated. * @param mode The operand mode for the value. * @param flags A set of flags for the value. * @return The new value to replace the value that was passed in. */ - public Value doValue(Value value, OperandMode mode, EnumSet flags) { - return doValue(value); - } + public abstract Value doValue(Value value, OperandMode mode, EnumSet flags); @Override public final Value doValue(LIRInstruction instruction, Value value, OperandMode mode, EnumSet flags) {