Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
794 B
29 lines
794 B
package dev.openrs2.asm;
|
|
|
|
import org.objectweb.asm.tree.AbstractInsnNode;
|
|
|
|
public final class InsnNodeUtils {
|
|
public static AbstractInsnNode nextReal(AbstractInsnNode insn) {
|
|
while ((insn = insn.getNext()) != null && insn.getOpcode() == -1);
|
|
return insn;
|
|
}
|
|
|
|
public static AbstractInsnNode previousReal(AbstractInsnNode insn) {
|
|
while ((insn = insn.getPrevious()) != null && insn.getOpcode() == -1);
|
|
return insn;
|
|
}
|
|
|
|
public static AbstractInsnNode nextVirtual(AbstractInsnNode insn) {
|
|
while ((insn = insn.getNext()) != null && insn.getOpcode() != -1);
|
|
return insn;
|
|
}
|
|
|
|
public static AbstractInsnNode previousVirtual(AbstractInsnNode insn) {
|
|
while ((insn = insn.getPrevious()) != null && insn.getOpcode() != -1);
|
|
return insn;
|
|
}
|
|
|
|
private InsnNodeUtils() {
|
|
/* empty */
|
|
}
|
|
}
|
|
|