mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Break eliminator now takes in account try/catch statement. See
https://github.com/konsoletyper/teavm/issues/93
This commit is contained in:
parent
911ab06e90
commit
6bf9a728a9
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user