comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2757:152b98832b0e

Merge.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Fri, 20 May 2011 14:52:25 +0200
parents bfcdda4fdd73 80b024e75b29
children 5e8a69041cd7
comparison
equal deleted inserted replaced
2756:bfcdda4fdd73 2757:152b98832b0e
1170 private void iterateAllBlocks() { 1170 private void iterateAllBlocks() {
1171 Block block; 1171 Block block;
1172 while ((block = removeFromWorkList()) != null) { 1172 while ((block = removeFromWorkList()) != null) {
1173 1173
1174 // remove blocks that have no predecessors by the time it their bytecodes are parsed 1174 // remove blocks that have no predecessors by the time it their bytecodes are parsed
1175 Instruction firstInstruction = block.firstInstruction; 1175 if (block.firstInstruction == null) {
1176 if (firstInstruction.predecessors().size() == 0) {
1177 markVisited(block); 1176 markVisited(block);
1178 continue; 1177 continue;
1179 } 1178 }
1180 1179
1181 if (!isVisited(block)) { 1180 if (!isVisited(block)) {
1182 markVisited(block); 1181 markVisited(block);
1183 // now parse the block 1182 // now parse the block
1184 frameState.initializeFrom(((BlockBegin) firstInstruction).stateBefore()); 1183 frameState.initializeFrom(((BlockBegin) block.firstInstruction).stateBefore());
1185 lastInstr = firstInstruction; 1184 lastInstr = block.firstInstruction;
1186 assert firstInstruction.next() == null; 1185 assert block.firstInstruction.next() == null;
1187 1186
1188 iterateBytecodesForBlock(block); 1187 iterateBytecodesForBlock(block);
1189 } 1188 }
1190 } 1189 }
1191 } 1190 }