Commit ea1c1eb8 authored by Skylot's avatar Skylot

core: fix insn move check for field assign (#326)

parent b83e20b5
......@@ -134,8 +134,14 @@ public class CodeShrinker extends AbstractVisitor {
}
private static boolean usedArgAssign(InsnNode insn, BitSet args) {
if (args.isEmpty()) {
return false;
}
RegisterArg result = insn.getResult();
return result != null && args.get(result.getRegNum());
if (result == null || result.isField()) {
return false;
}
return args.get(result.getRegNum());
}
public WrapInfo inline(int assignInsnPos, RegisterArg arg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment