diff --git a/teavm-core/src/main/java/org/teavm/javascript/Renderer.java b/teavm-core/src/main/java/org/teavm/javascript/Renderer.java index a74505f75..e1e24e13f 100644 --- a/teavm-core/src/main/java/org/teavm/javascript/Renderer.java +++ b/teavm-core/src/main/java/org/teavm/javascript/Renderer.java @@ -63,7 +63,7 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext Object.class, "monitorEnter", Object.class, void.class); writer.appendMethodBody(monitorEnterRef).append("("); - statement.acceptVisitor(this); + statement.getObjectRef().acceptVisitor(this); writer.append(");").softNewLine(); } catch (IOException ex){ @@ -80,7 +80,7 @@ public class Renderer implements ExprVisitor, StatementVisitor, RenderingContext Object.class, "monitorExit", Object.class, void.class); writer.appendMethodBody(monitorExitRef).append("("); - statement.acceptVisitor(this); + statement.getObjectRef().acceptVisitor(this); writer.append(");").softNewLine(); } catch (IOException ex){ throw new RenderingException("IO error occured", ex); diff --git a/teavm-core/src/main/java/org/teavm/model/InstructionReadVisitor.java b/teavm-core/src/main/java/org/teavm/model/InstructionReadVisitor.java index 446953241..5d7627469 100644 --- a/teavm-core/src/main/java/org/teavm/model/InstructionReadVisitor.java +++ b/teavm-core/src/main/java/org/teavm/model/InstructionReadVisitor.java @@ -204,11 +204,11 @@ class InstructionReadVisitor implements InstructionVisitor { @Override public void visit(MonitorEnterInstruction insn) { - + reader.monitorEnter(insn.getObjectRef()); } @Override public void visit(MonitorExitInstruction insn) { - + reader.monitorExit(insn.getObjectRef()); } }