diff graal/GraalCompiler/src/com/sun/c1x/lir/LIRTableSwitch.java @ 2718:c1ce2a53d6c3

Attempt to remove dependency between backend and BlockBegin.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Thu, 19 May 2011 16:05:42 +0200
parents 16b9a8b5ad39
children c379183d1c54
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/lir/LIRTableSwitch.java	Thu May 19 14:31:03 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/lir/LIRTableSwitch.java	Thu May 19 16:05:42 2011 +0200
@@ -66,24 +66,4 @@
         }
         return buf.toString();
     }
-
-    private BlockBegin substitute(BlockBegin block, BlockBegin oldBlock, BlockBegin newBlock) {
-        if (block == oldBlock) {
-            LIRInstruction instr = newBlock.lir().instructionsList().get(0);
-            assert instr instanceof LIRLabel : "first instruction of block must be label";
-            return newBlock;
-        }
-        return oldBlock;
-    }
-
-    public void substitute(BlockBegin oldBlock, BlockBegin newBlock) {
-        if (substitute(defaultTarget, oldBlock, newBlock) == newBlock) {
-            defaultTarget = newBlock;
-        }
-        for (int i = 0; i < targets.length; i++) {
-            if (substitute(targets[i], oldBlock, newBlock) == newBlock) {
-                targets[i] = newBlock;
-            }
-        }
-    }
 }