Disabl redundant return elimination in async methods. Fix https://github.com/konsoletyper/teavm/issues/235

This commit is contained in:
Alexey Andreev 2017-01-31 22:45:17 +03:00
parent e992297781
commit 751587bddc

View File

@ -84,10 +84,8 @@ public class Optimizer {
method.getVariables().addAll(unusedEliminator.getReorderedVariables());
RedundantLabelEliminator labelEliminator = new RedundantLabelEliminator();
RedundantReturnElimination returnElimination = new RedundantReturnElimination();
for (AsyncMethodPart part : method.getBody()) {
part.getStatement().acceptVisitor(labelEliminator);
part.getStatement().acceptVisitor(returnElimination);
}
for (int i = 0; i < method.getVariables().size(); ++i) {