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