1 19 20 25 26 27 28 29 30 31 package soot.jimple.internal; 32 33 import soot.tagkit.*; 34 import soot.*; 35 import soot.jimple.*; 36 import soot.util.*; 37 import java.util.*; 38 39 abstract public class AbstractJimpleIntLongBinopExpr extends AbstractIntLongBinopExpr implements ConvertToBaf 40 { 41 protected AbstractJimpleIntLongBinopExpr(Value op1, Value op2) 42 { 43 this.op1Box = Jimple.v().newArgBox(op1); 44 this.op2Box = Jimple.v().newArgBox(op2); 45 } 46 47 public void convertToBaf(JimpleToBafContext context, List out) 48 { 49 ((ConvertToBaf) this.getOp1()).convertToBaf(context, out); 50 ((ConvertToBaf) this.getOp2()).convertToBaf(context, out); 51 Unit u = (Unit)makeBafInst(this.getOp1().getType()); 52 out.add(u); 53 Iterator it = context.getCurrentUnit().getTags().iterator(); 54 while(it.hasNext()) { 55 u.addTag((Tag) it.next()); 56 } 57 } 58 59 abstract Object makeBafInst(Type opType); 60 } 61 | Popular Tags |