From b7c7c2da739fcc6fb01b4d0be9623719a882133d Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Sat, 18 Apr 2015 08:37:22 +0300 Subject: [PATCH] Fix bug with exception catch variable --- .../src/main/java/org/teavm/javascript/Decompiler.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/teavm-core/src/main/java/org/teavm/javascript/Decompiler.java b/teavm-core/src/main/java/org/teavm/javascript/Decompiler.java index f2f1f2ea6..97e19d484 100644 --- a/teavm-core/src/main/java/org/teavm/javascript/Decompiler.java +++ b/teavm-core/src/main/java/org/teavm/javascript/Decompiler.java @@ -470,10 +470,6 @@ public class Decompiler { if (!Objects.equals(tryCatch.getExceptionType(), bookmark.exceptionType)) { break; } - if (tryCatch.getExceptionVariable() != null && bookmark.exceptionVariable != null && - tryCatch.getExceptionVariable().getRegister() != bookmark.exceptionVariable.intValue()) { - break; - } } // Close old bookmarks @@ -523,7 +519,7 @@ public class Decompiler { bookmark.exceptionHandler = tryCatch.getHandler().getIndex(); bookmark.exceptionType = tryCatch.getExceptionType(); bookmark.exceptionVariable = tryCatch.getExceptionVariable() != null ? - tryCatch.getExceptionVariable().getRegister() : null; + tryCatch.getExceptionVariable().getIndex() : null; bookmark.block.tryCatches.add(bookmark); tryCatchBookmarks.add(bookmark); }