Chromium Code Reviews| Index: frog/leg/ssa/tracer.dart |
| =================================================================== |
| --- frog/leg/ssa/tracer.dart (revision 3986) |
| +++ frog/leg/ssa/tracer.dart (working copy) |
| @@ -382,6 +382,24 @@ |
| return visitInvokeStatic(node); |
| } |
| + String visitTry(HTry node) { |
|
floitsch
2012/02/08 10:07:53
Did you test this in the c1visualizer?
ngeoffray
2012/02/08 10:17:17
Just did, and it works :)
|
| + List<HBasicBlock> successors = currentBlock.successors; |
| + String tryBlock = 'B${successors[0].id}'; |
| + StringBuffer catchBlocks = new StringBuffer(); |
| + for (int i = 1; i < successors.length - 1; i++) { |
| + catchBlocks.add('B${successors[i].id}, '); |
| + } |
| + |
| + String finallyBlock; |
| + if (node.finallyBlock != null) { |
| + finallyBlock = 'B${node.finallyBlock.id}'; |
| + } else { |
| + catchBlocks.add('B${successors[successors.length - 1].id}'); |
| + finallyBlock = 'none'; |
| + } |
| + return "Try: $tryBlock, Catch: $catchBlocks, Finally: $finallyBlock"; |
| + } |
| + |
| String visitTypeGuard(HTypeGuard node) { |
| String type; |
| switch (node.type) { |