Пример #1
0
  public BSwapInst(Type fromType, Type toType) {

    if (fromType instanceof LongType || fromType instanceof DoubleType)
      throw new RuntimeException("fromType is LongType or DoubleType !");
    if (toType instanceof LongType || toType instanceof DoubleType)
      throw new RuntimeException("toType is LongType or DoubleType !");

    mFromType = Baf.getDescriptorTypeOf(fromType);
    mToType = Baf.getDescriptorTypeOf(toType);
  }
Пример #2
0
 public void convertToBaf(JimpleToBafContext context, List<Unit> out) {
   Unit u = Baf.v().newLoadInst(getType(), context.getBafLocalOfJimpleLocal(this));
   out.add(u);
   Iterator it = context.getCurrentUnit().getTags().iterator();
   while (it.hasNext()) {
     u.addTag((Tag) it.next());
   }
 }
Пример #3
0
  public void convertToBaf(JimpleToBafContext context, List out) {
    Unit u = Baf.v().newStaticGetInst(fieldRef);
    out.add(u);

    Iterator it = context.getCurrentUnit().getTags().iterator();
    while (it.hasNext()) {
      u.addTag((Tag) it.next());
    }
  }
Пример #4
0
  public void convertToBaf(JimpleToBafContext context, List<Unit> out) {
    ((ConvertToBaf) getOp()).convertToBaf(context, out);

    Unit u;
    out.add(u = Baf.v().newThrowInst());

    Unit currentUnit = this;

    Iterator it = currentUnit.getTags().iterator();
    while (it.hasNext()) {
      u.addTag((Tag) it.next());
    }
  }
  public void convertToBaf(JimpleToBafContext context, List out) {
    for (int i = 0; i < argBoxes.size(); i++) {
      ((ConvertToBaf) (getArg(i))).convertToBaf(context, out);
    }

    Unit u;
    out.add(u = Baf.v().newStaticInvokeInst(methodRef));

    Unit currentUnit = context.getCurrentUnit();

    Iterator it = currentUnit.getTags().iterator();
    while (it.hasNext()) {
      u.addTag((Tag) it.next());
    }
  }
Пример #6
0
 public BIfCmpLeInst(Type opType, Unit target) {
   super(opType, Baf.v().newInstBox(target));
 }
Пример #7
0
 public String toString() {
   return "swap." + Baf.bafDescriptorOf(mFromType) + Baf.bafDescriptorOf(mToType);
 }
Пример #8
0
 Object makeBafInst(Type opType) {
   return Baf.v().newShrInst(this.getOp1().getType());
 }