Break eliminator now takes in account try/catch statement. See

https://github.com/konsoletyper/teavm/issues/93
This commit is contained in:
Alexey Andreev 2015-04-03 15:11:07 +04:00
parent 911ab06e90
commit 6bf9a728a9

View File

@ -138,8 +138,14 @@ class BreakEliminator implements StatementVisitor {
@Override @Override
public void visit(TryCatchStatement statement) { public void visit(TryCatchStatement statement) {
Map<BlockStatement, List<Statement>> oldBlockSuccessors = blockSuccessors;
Set<IdentifiedStatement> oldOuterStatements = outerStatements;
outerStatements = new HashSet<>();
blockSuccessors = new HashMap<>();
processSequence(statement.getProtectedBody()); processSequence(statement.getProtectedBody());
processSequence(statement.getHandler()); processSequence(statement.getHandler());
outerStatements = oldOuterStatements;
blockSuccessors = oldBlockSuccessors;
} }
@Override @Override