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.
 
 
 
 
openrs2/asm/src/main/java/dev/openrs2/asm/InsnNodeUtils.java

37 lines
874 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) {
/* empty */
}
return insn;
}
public static AbstractInsnNode previousReal(AbstractInsnNode insn) {
while ((insn = insn.getPrevious()) != null && insn.getOpcode() == -1) {
/* empty */
}
return insn;
}
public static AbstractInsnNode nextVirtual(AbstractInsnNode insn) {
while ((insn = insn.getNext()) != null && insn.getOpcode() != -1) {
/* empty */
}
return insn;
}
public static AbstractInsnNode previousVirtual(AbstractInsnNode insn) {
while ((insn = insn.getPrevious()) != null && insn.getOpcode() != -1) {
/* empty */
}
return insn;
}
private InsnNodeUtils() {
/* empty */
}
}