|
|
|
@ -1531,7 +1531,8 @@ public class ConstantAnalyzer implements Opcodes, CodeAnalyzer { |
|
|
|
|
case opc_lrem: case opc_drem: |
|
|
|
|
case opc_land: case opc_lor : case opc_lxor: |
|
|
|
|
iter.set(new Instruction(opc_pop2)); |
|
|
|
|
/* fall through */ |
|
|
|
|
iter.add(new Instruction(opc_pop2)); |
|
|
|
|
break; |
|
|
|
|
case opc_if_icmpeq: case opc_if_icmpne: |
|
|
|
|
case opc_if_icmplt: case opc_if_icmpge: |
|
|
|
|
case opc_if_icmpgt: case opc_if_icmple: |
|
|
|
@ -1574,14 +1575,14 @@ public class ConstantAnalyzer implements Opcodes, CodeAnalyzer { |
|
|
|
|
case opc_invokevirtual: { |
|
|
|
|
Reference ref = instr.getReference(); |
|
|
|
|
String[] pt = TypeSignature.getParameterTypes(ref.getType()); |
|
|
|
|
int arg = 0; |
|
|
|
|
if (instr.getOpcode() != opc_invokestatic) |
|
|
|
|
iter.set(new Instruction(opc_pop)); |
|
|
|
|
else if (pt.length > 0) { |
|
|
|
|
iter.set(new Instruction(TypeSignature.getTypeSize(pt[0]) |
|
|
|
|
int len = pt.length; |
|
|
|
|
|
|
|
|
|
if (len > 0) |
|
|
|
|
iter.set(new Instruction(TypeSignature.getTypeSize(pt[--len]) |
|
|
|
|
+ opc_pop - 1)); |
|
|
|
|
arg++; |
|
|
|
|
} else { |
|
|
|
|
else if (instr.getOpcode() != opc_invokestatic) |
|
|
|
|
iter.set(new Instruction(opc_pop)); |
|
|
|
|
else { |
|
|
|
|
if (replacement == null) |
|
|
|
|
iter.remove(); |
|
|
|
|
else |
|
|
|
@ -1589,7 +1590,7 @@ public class ConstantAnalyzer implements Opcodes, CodeAnalyzer { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (int i=arg; i < pt.length; i++) |
|
|
|
|
for (int i = len - 1; i >= 0; i++) |
|
|
|
|
iter.add(new Instruction(TypeSignature.getTypeSize(pt[i]) |
|
|
|
|
+ opc_pop - 1)); |
|
|
|
|
} |
|
|
|
|