private Insn buildConstWideInsn(long literal) { if (SootToDexUtils.fitsSigned16(literal)) { return new Insn21s(Opcode.CONST_WIDE_16, destinationReg, (short) literal); } else if (SootToDexUtils.fitsSigned32(literal)) { return new Insn31i(Opcode.CONST_WIDE_32, destinationReg, (int) literal); } else { return new Insn51l(Opcode.CONST_WIDE, destinationReg, literal); } }
private Insn buildConstInsn(int literal) { if (SootToDexUtils.fitsSigned4(literal)) { return new Insn11n(Opcode.CONST_4, destinationReg, (byte) literal); } if (SootToDexUtils.fitsSigned16(literal)) { return new Insn21s(Opcode.CONST_16, destinationReg, (short) literal); } return new Insn31i(Opcode.CONST, destinationReg, literal); }
public void caseClassConstant(ClassConstant c) { // "array class" types are unmodified boolean classIsArray = c.value.startsWith("["); String className = classIsArray ? c.value : SootToDexUtils.getDexClassName(c.value); TypeIdItem referencedClass = TypeIdItem.internTypeIdItem(stmtV.getBelongingFile(), className); stmtV.addInsn(new Insn21c(Opcode.CONST_CLASS, destinationReg, referencedClass)); }
public boolean isObject() { return SootToDexUtils.isObject(type); }
public boolean isWide() { return SootToDexUtils.isWide(type); }