diff graal/GraalCompiler/src/com/sun/c1x/ir/Op2.java @ 2587:51ebe5f0516f

changed NegateOp, more Op2 changes (generic inputValuesDo impl)
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 05 May 2011 15:01:34 +0200
parents 421da5f53b5e
children fec99fc30af1
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Op2.java	Thu May 05 14:37:17 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Op2.java	Thu May 05 15:01:34 2011 +0200
@@ -84,8 +84,8 @@
      * @param x the first input instruction
      * @param y the second input instruction
      */
-    public Op2(CiKind kind, int opcode, Value x, Value y, Graph graph) {
-        super(kind, INPUT_COUNT, SUCCESSOR_COUNT, graph);
+    public Op2(CiKind kind, int opcode, Value x, Value y, int inputCount, int successorCount, Graph graph) {
+        super(kind, inputCount + INPUT_COUNT, successorCount + SUCCESSOR_COUNT, graph);
         this.opcode = opcode;
         setX(x);
         setY(y);
@@ -101,16 +101,6 @@
         setY(t);
     }
 
-    /**
-     * Iterates over the inputs to this instruction.
-     * @param closure the closure to apply to each input value
-     */
-    @Override
-    public void inputValuesDo(ValueClosure closure) {
-        setX(closure.apply(x()));
-        setY(closure.apply(y()));
-    }
-
     @Override
     public int valueNumber() {
         return Util.hash2(opcode, x(), y());