This is a prerequisite for removing dummy arguments - before the methods
are remapped, removing an argument might cause the method to conflict
with another method with the same name and descriptor as the replacement
descriptor.
I'm not yet sure if I'm going to need to use this, but I want to get it
in the repository so I have a copy of it for the future (this is already
the second time I've written something similar to it!)
This is in preparation for Transformers taking an entire ClassPath
instead of a single Library at a time, which is in turn required for
dummy argument removal (a whole program analysis).
InsnMatcher converts an InsnList to a string of private use codepoints,
where each codepoint maps to an opcode. This allows regular expressions
to be written (using the native Java regular expression engine) to
extract subsequences of instructions whose opcodes match a regex.
This commit introduces four methods: two for finding the next/previous
AbstractInsnNode that contains a real JVM opcode and two for finding the
next/previous AbstractInsnNode that is virtual (e.g. a label).