Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2657:4a6518c4d17d
Removed need for base instruction. Cleanup.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 11 May 2011 16:10:49 +0200 |
parents | 6d19b4f476db |
children | 194d93d089bd |
comparison
equal
deleted
inserted
replaced
2656:37f067e76c6f | 2657:4a6518c4d17d |
---|---|
208 } | 208 } |
209 } | 209 } |
210 | 210 |
211 private void finishStartBlock(BlockBegin startBlock, BlockBegin stdEntry) { | 211 private void finishStartBlock(BlockBegin startBlock, BlockBegin stdEntry) { |
212 assert curBlock == startBlock; | 212 assert curBlock == startBlock; |
213 Base base = new Base(stdEntry, graph); | 213 FrameState stateAfter = frameState.create(bci()); |
214 Goto base = new Goto(stdEntry, stateAfter, false, graph); | |
214 appendWithoutOptimization(base, 0); | 215 appendWithoutOptimization(base, 0); |
215 FrameState stateAfter = frameState.create(bci()); | |
216 base.setStateAfter(stateAfter); | |
217 startBlock.setEnd(base); | 216 startBlock.setEnd(base); |
218 assert stdEntry.stateBefore() == null; | 217 assert stdEntry.stateBefore() == null; |
219 stdEntry.mergeOrClone(stateAfter, method()); | 218 stdEntry.mergeOrClone(stateAfter, method()); |
220 } | 219 } |
221 | 220 |
323 | 322 |
324 // stop when reaching catch all | 323 // stop when reaching catch all |
325 return handler.isCatchAll(); | 324 return handler.isCatchAll(); |
326 } | 325 } |
327 | 326 |
328 void genLoadConstant(int cpi) { | 327 private void genLoadConstant(int cpi) { |
329 Object con = constantPool().lookupConstant(cpi); | 328 Object con = constantPool().lookupConstant(cpi); |
330 | 329 |
331 if (con instanceof RiType) { | 330 if (con instanceof RiType) { |
332 // this is a load of class constant which might be unresolved | 331 // this is a load of class constant which might be unresolved |
333 RiType riType = (RiType) con; | 332 RiType riType = (RiType) con; |
937 } | 936 } |
938 | 937 |
939 assert x.next() == null : "instruction should not have been appended yet"; | 938 assert x.next() == null : "instruction should not have been appended yet"; |
940 assert lastInstr.next() == null : "cannot append instruction to instruction which isn't end (" + lastInstr + "->" + lastInstr.next() + ")"; | 939 assert lastInstr.next() == null : "cannot append instruction to instruction which isn't end (" + lastInstr + "->" + lastInstr.next() + ")"; |
941 | 940 |
942 if (lastInstr instanceof Base) { | 941 lastInstr = lastInstr.appendNext(x, bci); |
943 assert false : "may only happen when inlining intrinsics"; | |
944 } else { | |
945 lastInstr = lastInstr.appendNext(x, bci); | |
946 } | |
947 if (++stats.nodeCount >= C1XOptions.MaximumInstructionCount) { | 942 if (++stats.nodeCount >= C1XOptions.MaximumInstructionCount) { |
948 // bailout if we've exceeded the maximum inlining size | 943 // bailout if we've exceeded the maximum inlining size |
949 throw new CiBailout("Method and/or inlining is too large"); | 944 throw new CiBailout("Method and/or inlining is too large"); |
950 } | 945 } |
951 | 946 |