Example #1
0
 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);
   }
 }
Example #2
0
 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);
 }
Example #3
0
 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));
 }
Example #4
0
 public boolean isObject() {
   return SootToDexUtils.isObject(type);
 }
Example #5
0
 public boolean isWide() {
   return SootToDexUtils.isWide(type);
 }