From 04342d15e7d2108b0d38fd435e9fdcaabb1b6ec4 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Wed, 11 Mar 2015 11:09:57 +0400 Subject: [PATCH] Fix minor issue --- teavm-core/src/main/java/org/teavm/javascript/Decompiler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 7e09ab256..4ffb6b11b 100644 --- a/teavm-core/src/main/java/org/teavm/javascript/Decompiler.java +++ b/teavm-core/src/main/java/org/teavm/javascript/Decompiler.java @@ -23,6 +23,7 @@ import org.teavm.javascript.spi.Generator; import org.teavm.javascript.spi.InjectedBy; import org.teavm.model.*; import org.teavm.model.instructions.InvokeInstruction; +import org.teavm.model.instructions.MonitorEnterInstruction; import org.teavm.model.util.AsyncProgramSplitter; import org.teavm.model.util.ProgramUtils; @@ -310,7 +311,7 @@ public class Decompiler { generator.setCurrentLocation(nodeLocation); } insn.acceptVisitor(generator); - if (insn instanceof InvokeInstruction && !saved) { + if (!saved && (insn instanceof InvokeInstruction || insn instanceof MonitorEnterInstruction)) { generator.statements.add(new SaveStatement()); saved = true; }