diff graal/GraalCompiler/src/com/sun/c1x/ir/BlockEnd.java @ 2769:dd6419f4bfe2

Fixed several issues with incorrect predecessor count/order. One known issue around exception dispatch remaining in fop.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 23 May 2011 21:21:47 +0200
parents ca31e84ff154
children 93fd92c9f8b0
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/BlockEnd.java	Mon May 23 19:21:53 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/ir/BlockEnd.java	Mon May 23 21:21:47 2011 +0200
@@ -129,13 +129,16 @@
      * @param oldSucc the old successor to replace
      * @param newSucc the new successor
      */
-    public void substituteSuccessor(BlockBegin oldSucc, BlockBegin newSucc) {
+    public int substituteSuccessor(BlockBegin oldSucc, BlockBegin newSucc) {
         assert newSucc != null;
+        int count = 0;
         for (int i = 0; i < blockSuccessorCount; i++) {
             if (blockSuccessor(i) == oldSucc) {
                 setBlockSuccessor(i, newSucc);
+                count++;
             }
         }
+        return count;
     }
 
     /**