mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Made small change to statement generator for monitor instructions.
This commit is contained in:
parent
68aa193728
commit
d37da2b078
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user