comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2775:3b73b230b86b

Removed more stateAfter usages.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Tue, 24 May 2011 13:51:32 +0200
parents 93fd92c9f8b0
children 398b8fa5dc81
comparison
equal deleted inserted replaced
2774:93fd92c9f8b0 2775:3b73b230b86b
1165 append(new Goto(nextDispatch, graph)); 1165 append(new Goto(nextDispatch, graph));
1166 } 1166 }
1167 } 1167 }
1168 } 1168 }
1169 1169
1170 private BlockEnd iterateBytecodesForBlock(Block block) { 1170 private void iterateBytecodesForBlock(Block block) {
1171 assert frameState != null; 1171 assert frameState != null;
1172 1172
1173 stream.setBCI(block.startBci); 1173 stream.setBCI(block.startBci);
1174 1174
1175 BlockEnd end = null; 1175 BlockEnd end = null;
1205 stateSplit.setStateAfter(frameState.create(bci)); 1205 stateSplit.setStateAfter(frameState.create(bci));
1206 } 1206 }
1207 } 1207 }
1208 blockStart = false; 1208 blockStart = false;
1209 } 1209 }
1210
1211 // if the method terminates, we don't need the stack anymore
1212 if (end instanceof Return || end instanceof Throw) {
1213 frameState.clearStack();
1214 }
1215
1216 // connect to begin and set state
1217 // NOTE that inlining may have changed the block we are parsing
1218 assert end != null : "end should exist after iterating over bytecodes";
1219 end.setStateAfter(frameState.create(bci()));
1220 return end;
1221 } 1210 }
1222 1211
1223 private void traceState() { 1212 private void traceState() {
1224 if (C1XOptions.TraceBytecodeParserLevel >= TRACELEVEL_STATE && !TTY.isSuppressed()) { 1213 if (C1XOptions.TraceBytecodeParserLevel >= TRACELEVEL_STATE && !TTY.isSuppressed()) {
1225 log.println(String.format("| state [nr locals = %d, stack depth = %d, method = %s]", frameState.localsSize(), frameState.stackSize(), method())); 1214 log.println(String.format("| state [nr locals = %d, stack depth = %d, method = %s]", frameState.localsSize(), frameState.stackSize(), method()));