From 484bf61a5c3bb49cb1bb7e153a55c9692d38e8d5 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 6 Feb 2015 18:01:20 +0400 Subject: [PATCH] Fix wielding of try/catch blocks --- .../src/main/java/org/teavm/javascript/OptimizingVisitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java b/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java index 03eb93654..3d432424b 100644 --- a/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java +++ b/teavm-core/src/main/java/org/teavm/javascript/OptimizingVisitor.java @@ -289,6 +289,7 @@ class OptimizingVisitor implements StatementVisitor, ExprVisitor { List backup = resultSequence; resultSequence = new ArrayList<>(); processSequenceImpl(statements); + wieldTryCatch(resultSequence); List result = new ArrayList<>(); for (Statement part : resultSequence) { if (part != null) { @@ -321,7 +322,6 @@ class OptimizingVisitor implements StatementVisitor, ExprVisitor { return false; } } - wieldTryCatch(statements); return true; }