Made small change to statement generator for monitor instructions.

This commit is contained in:
Steve Hannah 2015-02-07 07:34:02 -08:00
parent 68aa193728
commit d37da2b078

View File

@ -673,10 +673,7 @@ class StatementGenerator implements InstructionVisitor {
MonitorEnterStatement stmt = new MonitorEnterStatement(); MonitorEnterStatement stmt = new MonitorEnterStatement();
stmt.setLocation(currentLocation); stmt.setLocation(currentLocation);
VariableExpr expr = new VariableExpr(); stmt.setObjectRef(Expr.var(insn.getObjectRef().getIndex()));
expr.setIndex(insn.getObjectRef().getIndex());
expr.setLocation(currentLocation);
stmt.setObjectRef(expr);
statements.add(stmt); statements.add(stmt);
} }
@ -684,10 +681,8 @@ class StatementGenerator implements InstructionVisitor {
public void visit(MonitorExitInstruction insn) { public void visit(MonitorExitInstruction insn) {
MonitorExitStatement stmt = new MonitorExitStatement(); MonitorExitStatement stmt = new MonitorExitStatement();
stmt.setLocation(currentLocation); stmt.setLocation(currentLocation);
VariableExpr expr = new VariableExpr();
expr.setLocation(currentLocation); stmt.setObjectRef(Expr.var(insn.getObjectRef().getIndex()));
expr.setIndex(insn.getObjectRef().getIndex());
stmt.setObjectRef(expr);
statements.add(stmt); statements.add(stmt);
} }
} }