mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Disabl redundant return elimination in async methods. Fix https://github.com/konsoletyper/teavm/issues/235
This commit is contained in:
parent
e992297781
commit
751587bddc
|
@ -84,10 +84,8 @@ public class Optimizer {
|
||||||
method.getVariables().addAll(unusedEliminator.getReorderedVariables());
|
method.getVariables().addAll(unusedEliminator.getReorderedVariables());
|
||||||
|
|
||||||
RedundantLabelEliminator labelEliminator = new RedundantLabelEliminator();
|
RedundantLabelEliminator labelEliminator = new RedundantLabelEliminator();
|
||||||
RedundantReturnElimination returnElimination = new RedundantReturnElimination();
|
|
||||||
for (AsyncMethodPart part : method.getBody()) {
|
for (AsyncMethodPart part : method.getBody()) {
|
||||||
part.getStatement().acceptVisitor(labelEliminator);
|
part.getStatement().acceptVisitor(labelEliminator);
|
||||||
part.getStatement().acceptVisitor(returnElimination);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < method.getVariables().size(); ++i) {
|
for (int i = 0; i < method.getVariables().size(); ++i) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user