/** * Constructs a Local with the given name and type. */ public Local newLocal(String name, Type t) { return new JimpleLocal(name, t); }
@Override public String toString() { return getName(); }
@Override public void convertToBaf(JimpleToBafContext context, List<Unit> out) { Unit u = Baf.v().newLoadInst(getType(), context.getBafLocalOfJimpleLocal(this)); u.addAllTagsOf(context.getCurrentUnit()); out.add(u); }
/** Returns a clone of the current JimpleLocal. */ @Override public Object clone() { // do not intern the name again JimpleLocal local = new JimpleLocal(null, type); local.name = name; return local; }
public String toString() { return getName(); }
public Pair<Value, Set<DefinitionStmt>> createZeroValue() { return new Pair<Value, Set<DefinitionStmt>>(new JimpleLocal("<<zero>>", NullType.v()), Collections.<DefinitionStmt>emptySet()); }
public String toString() { return getName(); }
@Override public Local createZeroValue() { return new JimpleLocal("<<zero>>", NullType.v()); }
@Override public Local createZeroValue() { return new JimpleLocal("zero", NullType.v()); }
public Value createZeroValue() { return new JimpleLocal("<<zero>>", NullType.v()); }
/** * Clever convenience function to fetch or create new Local's given a Local and the desired subscript. **/ protected Local fetchNewLocal(Local local, Integer subscript) { Local oldLocal = local; if (!origLocals.contains(local)) { oldLocal = newLocalsToOldLocal.get(local); } if (subscript.intValue() == 0) { return oldLocal; } // If the name already exists, makeUniqueLocalNames() will // take care of it. String name = oldLocal.getName() + "_" + subscript; Local newLocal = newLocals.get(name); if (newLocal == null) { newLocal = new JimpleLocal(name, oldLocal.getType()); newLocals.put(name, newLocal); newLocalsToOldLocal.put(newLocal, oldLocal); // add proper Local declation body.getLocals().add(newLocal); } return newLocal; }
public Local get_ControlLocal() { if (controlLocal == null) { controlLocal = new JimpleLocal("controlLocal", IntType.v()); getLocals().add(controlLocal); } return controlLocal; }
Local newLocal = new JimpleLocal("handler", localType);
Local jimpleLocal = new JimpleLocal("handler", type);// takes care of
Local jimpleLocal = new JimpleLocal("handler", type);// takes care of
Local newLocal = new JimpleLocal("DavaTemp_" + field.getName(), localType); ref = new DStaticFieldRef(tempFieldRef, true); } else { ref = new DInstanceFieldRef(new JimpleLocal("this", field.getType()), tempFieldRef, new HashSet<Object>());
ref = new DStaticFieldRef(tempFieldRef, true); } else { ref = new DInstanceFieldRef(new JimpleLocal("this", fieldType), tempFieldRef, new HashSet<Object>());
Local newArrL = new JimpleLocal("$u" + (b.getLocalCount() + 1), ArrayType.v(rf, 1)); b.getLocals().add(newArrL); JAssignStmt newArr = new JAssignStmt(newArrL, new JNewArrayExpr(rf, IntConstant.v(parms.size())));
/** Returns a clone of the current JimpleLocal. */ public Object clone() { // RoboVM note: Changed to also clone index. JimpleLocal l = new JimpleLocal(name, type); l.index = this.index; return l; }