use of soot.jimple.ConvertToBaf in project soot by Sable.
the class JTableSwitchStmt method convertToBaf.
public void convertToBaf(JimpleToBafContext context, List<Unit> out) {
List<PlaceholderInst> targetPlaceholders = new ArrayList<PlaceholderInst>();
((ConvertToBaf) getKey()).convertToBaf(context, out);
for (Unit target : getTargets()) {
targetPlaceholders.add(Baf.v().newPlaceholderInst(target));
}
Unit u = Baf.v().newTableSwitchInst(Baf.v().newPlaceholderInst(getDefaultTarget()), lowIndex, highIndex, targetPlaceholders);
u.addAllTagsOf(this);
out.add(u);
}
use of soot.jimple.ConvertToBaf in project soot by Sable.
the class JDynamicInvokeExpr method convertToBaf.
public void convertToBaf(JimpleToBafContext context, List<Unit> out) {
if (argBoxes != null) {
for (ValueBox element : argBoxes) {
((ConvertToBaf) (element.getValue())).convertToBaf(context, out);
}
}
List<Value> bsmArgs = new ArrayList<Value>();
for (ValueBox argBox : bsmArgBoxes) {
bsmArgs.add(argBox.getValue());
}
Unit u = Baf.v().newDynamicInvokeInst(bsmRef, bsmArgs, methodRef, tag);
u.addAllTagsOf(context.getCurrentUnit());
out.add(u);
}
use of soot.jimple.ConvertToBaf in project soot by Sable.
the class AbstractVirtualInvokeExpr method convertToBaf.
public void convertToBaf(JimpleToBafContext context, List<Unit> out) {
((ConvertToBaf) (getBase())).convertToBaf(context, out);
if (argBoxes != null) {
for (ValueBox element : argBoxes) {
((ConvertToBaf) (element.getValue())).convertToBaf(context, out);
}
}
Unit u = Baf.v().newVirtualInvokeInst(methodRef);
out.add(u);
u.addAllTagsOf(context.getCurrentUnit());
}
use of soot.jimple.ConvertToBaf in project soot by Sable.
the class JLookupSwitchStmt method convertToBaf.
public void convertToBaf(JimpleToBafContext context, List<Unit> out) {
List<PlaceholderInst> targetPlaceholders = new ArrayList<PlaceholderInst>();
((ConvertToBaf) getKey()).convertToBaf(context, out);
for (Unit target : getTargets()) {
targetPlaceholders.add(Baf.v().newPlaceholderInst(target));
}
Unit u = Baf.v().newLookupSwitchInst(Baf.v().newPlaceholderInst(getDefaultTarget()), getLookupValues(), targetPlaceholders);
u.addAllTagsOf(this);
out.add(u);
}
Aggregations