Guest User

Untitled

a guest
Jul 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. for (AbstractInsnNode node : mn.instructions.toArray()) {
  2. if (node.getOpcode() == Opcodes.IXOR) {
  3. if (node.getPrevious().getOpcode() == Opcodes.ICONST_M1) {
  4. mn.instructions.remove(node.getPrevious());
  5. }
  6. if (node.getPrevious().getOpcode() == Opcodes.ICONST_M1) {
  7. mn.instructions.set(node.getNext(), new InsnNode(Opcodes.ICONST_0));
  8. }
  9. mn.instructions.remove(node);
  10. modifications++;
  11. }
  12. }
Add Comment
Please, Sign In to add comment