}
@Override
public void simulate(Stack stack) {
if(op.code != Opcode.IINC) {
ValueFromLocalVariable toPush = new ValueFromLocalVariable(localVariable);
if(!load) {
StackElement poppedSe;
if(doubleLength)
poppedSe = stack.pop2();
else poppedSe = stack.pop();
/* when a name is null while LocalVariableTable is present, it is likely that this class has been
* previously enhanced and this local variable is just a variable proxy, so grab the original local
* variable and consider its name
*/
if(poppedSe instanceof ValueFromLocalVariable && (localVariable == null || localVariable.name == null)) {
LOGGER.debug("ATTENTION ************** variable proxy for lv = '" + ((ValueFromLocalVariable) poppedSe).localVariable + "'");
toPush = new ValueFromLocalVariable(((ValueFromLocalVariable) poppedSe).localVariable);
}
} else {
if(doubleLength)
stack.push2(toPush);
else stack.push(toPush);