Add support for redirecting LOAD and STORE
if(object != null) { // we want to change this
...
}
which in bytecode, would (roughly) translate to
ALOAD 0
IFNULL
...
At the moment, there is no way of redirecting the ALOAD (or swapping the top value on the stack after the instruction) at the location to change the logic of the if statement.
You could use a ModifyLocal here, however, you may not want to modify the original value, but just swap the top value on the stack prior to the IFNULL with a different value, to, for example, change the logic of the if statement.
Could that also be extended to cover array access equivalents, similar to field array redirects?
In theory this should work identically to redirecting a GETFIELD or PUTFIELD, so hopefully yes, but that will be determined when I come to look at it.