From 7e2421df8951151d009d1eb88590bfd7e456042d Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 31 Jul 2019 16:30:58 +0100 Subject: [PATCH] Relax operand equality condition in try/finally detection This isn't ideal and probably isn't safe in the general case, but it does fix the only case where we couldn't deinline a finally block. (In turn, this caused further problems because the SSA code is not aware of the monitor variables inserted by Fernflower if it can't deinline a finally block.) --- .../decompiler/modules/decompiler/FinallyProcessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java index 240ee3e..e88c9d7 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java @@ -843,11 +843,11 @@ public class FinallyProcessor { if (firstOp != secondOp) { // a-load/store instructions if (first.opcode == CodeConstants.opc_aload || first.opcode == CodeConstants.opc_astore) { - for (int[] arr : lstStoreVars) { - if (arr[0] == firstOp && arr[1] == secondOp) { + //for (int[] arr : lstStoreVars) { + // if (arr[0] == firstOp && arr[1] == secondOp) { return true; - } - } + // } + //} } return false;