comparison 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
comparison
equal deleted inserted replaced
2768:43ffa0e47a46 2769:dd6419f4bfe2
127 * Substitutes a successor block in this block end's successor list. Note that 127 * Substitutes a successor block in this block end's successor list. Note that
128 * this method updates all occurrences in the list. 128 * this method updates all occurrences in the list.
129 * @param oldSucc the old successor to replace 129 * @param oldSucc the old successor to replace
130 * @param newSucc the new successor 130 * @param newSucc the new successor
131 */ 131 */
132 public void substituteSuccessor(BlockBegin oldSucc, BlockBegin newSucc) { 132 public int substituteSuccessor(BlockBegin oldSucc, BlockBegin newSucc) {
133 assert newSucc != null; 133 assert newSucc != null;
134 int count = 0;
134 for (int i = 0; i < blockSuccessorCount; i++) { 135 for (int i = 0; i < blockSuccessorCount; i++) {
135 if (blockSuccessor(i) == oldSucc) { 136 if (blockSuccessor(i) == oldSucc) {
136 setBlockSuccessor(i, newSucc); 137 setBlockSuccessor(i, newSucc);
138 count++;
137 } 139 }
138 } 140 }
141 return count;
139 } 142 }
140 143
141 /** 144 /**
142 * Gets the successor corresponding to the default (fall through) case. 145 * Gets the successor corresponding to the default (fall through) case.
143 * @return the default successor 146 * @return the default successor