From 751587bddc4c828714075716afe1aea283a8f496 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 31 Jan 2017 22:45:17 +0300 Subject: [PATCH] Disabl redundant return elimination in async methods. Fix https://github.com/konsoletyper/teavm/issues/235 --- core/src/main/java/org/teavm/ast/optimization/Optimizer.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/src/main/java/org/teavm/ast/optimization/Optimizer.java b/core/src/main/java/org/teavm/ast/optimization/Optimizer.java index 40010bcbf..ee0b8afd1 100644 --- a/core/src/main/java/org/teavm/ast/optimization/Optimizer.java +++ b/core/src/main/java/org/teavm/ast/optimization/Optimizer.java @@ -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) {