Chromium Code Reviews| Index: frog/leg/ssa/builder.dart |
| diff --git a/frog/leg/ssa/builder.dart b/frog/leg/ssa/builder.dart |
| index 94f33fbbc10e8cd22fa81aa79829d2075c28ecd3..6c9c70b8b8515cd1a8c792cd576c8aded90a0108 100644 |
| --- a/frog/leg/ssa/builder.dart |
| +++ b/frog/leg/ssa/builder.dart |
| @@ -220,7 +220,7 @@ class SsaBuilder implements Visitor { |
| joinDefinitions(joinBlock, thenDefinitions, elseDefinitions); |
| } else if (thenBlockJoined) { |
| thenExitBlock.addGoto(graph, joinBlock); |
| - } else if (elseBlockJoined) { |
| + } else if (elseBlockJoined && hasElse) { |
| elseExitBlock.addGoto(graph, joinBlock); |
| } |
| } |
| @@ -325,7 +325,10 @@ class SsaBuilder implements Visitor { |
| } |
| visitThrow(Throw node) { |
| - compiler.unimplemented("SsaBuilder.visitThrow"); |
| + visit(node.expression); |
|
ngeoffray
2011/11/10 13:22:37
Note that expression may be null.
floitsch
2011/11/10 14:02:22
Done.
|
| + add(new HThrow(pop())); |
| + // A throw aborts the building of the current block. |
| + block = null; |
| } |
| visitTypeAnnotation(TypeAnnotation node) { |