Skip to content

Commit

Permalink
fix: resolve exception on as#line
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Dec 27, 2019
1 parent 04e309a commit f1e2291
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ private static void assignInline(MethodNode mth, RegisterArg arg, InsnNode assig
return;
}

InsnArg replaceArg = InsnArg.wrapArg(assignInsn.copy());
InsnArg replaceArg;
InsnType assignInsnType = assignInsn.getType();
if (assignInsnType == InsnType.MOVE || assignInsnType == InsnType.CONST) {
replaceArg = assignInsn.getArg(0).duplicate();
} else {
replaceArg = InsnArg.wrapArg(assignInsn.copy());
}
useInsn.replaceArg(useArg, replaceArg);

assignInsn.add(AFlag.REMOVE);
Expand Down

0 comments on commit f1e2291

Please # to comment.