Fixed issue with the instruction copier. Now it builds ok with synchronized instruction. Getting an error at runtime...

This commit is contained in:
Steve Hannah 2015-02-07 10:00:48 -08:00
parent d37da2b078
commit 21468ef419
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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());
}
}