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 AbstractJimpleIntBinopExpr extends AbstractIntBinopExpr 40 implements ConvertToBaf 41 { 42 protected AbstractJimpleIntBinopExpr(Value op1, Value op2) 43 { 44 this.op1Box = Jimple.v().newArgBox(op1); 45 this.op2Box = Jimple.v().newArgBox(op2); 46 } 47 48 public void convertToBaf(JimpleToBafContext context, List out) 49 { 50 ((ConvertToBaf) this.getOp1()).convertToBaf(context, out); 51 ((ConvertToBaf) this.getOp2()).convertToBaf(context, out); 52 53 Unit u = (Unit)makeBafInst(this.getOp1().getType()); 54 out.add(u); 55 Iterator it = context.getCurrentUnit().getTags().iterator(); 56 while(it.hasNext()) { 57 u.addTag((Tag) it.next()); 58 } 59 } 60 61 abstract Object makeBafInst(Type opType); 62 } 63 | Popular Tags |