/** Inserts <code>toInsert</code> in the Chain before <code>point</code>. */ @Override public void insertBefore(List<E> toInsert, E point) { E previousPoint = point; for (int i = toInsert.size() - 1; i >= 0; i--) { E o = toInsert.get(i); insertBeforeNoRedirect(o, previousPoint); previousPoint = o; } point.redirectJumpsToThisTo(toInsert.get(0)); }
((PatchingChain<Unit>) units).insertBeforeNoRedirect(newTarget, firstTargetStmt);
units.insertBefore(baseAssign, insertBefore); } else { units.insertBeforeNoRedirect(baseAssign, insertBefore);
Trap t = trapList.get(i); Unit nop = Baf.v().newNopInst(); units.insertBeforeNoRedirect(nop, headList.get(i)); headList.set(i, nop); t.setBeginUnit(nop); units.insertBeforeNoRedirect((Unit) pushZero.clone(), first); units.insertBeforeNoRedirect((Unit) storZero.clone(), first); units.add(Baf.v().newStoreInst(type, varLocal)); units.insertBeforeNoRedirect(FixUndefinedLocals.getPushInitializer(varLocal, type), first); units.insertBeforeNoRedirect(Baf.v().newStoreInst(type, varLocal), first); loadBooleanValue(units, f[1], begUnit); units.insertBeforeNoRedirect(Baf.v().newIfCmpEqInst(BooleanType.v(), begUnit), begUnit); units.insertBeforeNoRedirect(Baf.v().newPushInst(IntConstant.v(Rand.getInt(3) + 1)), begUnit); units.insertBeforeNoRedirect(Baf.v().newStoreInst(IntType.v(), controlLocal), begUnit); } else { units.insertBeforeNoRedirect(Baf.v().newIncInst(controlLocal, IntConstant.v(Rand.getInt(3) + 1)), begUnit);
units.insertBeforeNoRedirect(Jimple.v().newAssignStmt(l, IntConstant.v(0)), first); units.insertAfter(Jimple.v().newTableSwitchStmt(l, 1, zeroheight.size(), targs, u), ifstmt);
clinitUnits.add(newStmt); } else { clinitUnits.insertBeforeNoRedirect(newStmt, firstStmt); clinitUnits.add(initStmt); } else { clinitUnits.insertBeforeNoRedirect(initStmt, firstStmt); clinitUnits.add(assignStmt); } else { clinitUnits.insertBeforeNoRedirect(assignStmt, firstStmt);
= first instanceof GotoStmt ? ((GotoStmt) first).getTargetBox().getUnit() : firstReorderingUnit; final GotoStmt gotoFirstReorderingNotGotoStmt = Jimple.v().newGotoStmt(firstReorderingNotGotoStmt); units.insertBeforeNoRedirect(gotoFirstReorderingNotGotoStmt, reorderingUnit);
units.insertBefore(Baf.v().newDup1Inst(RefType.v()), sii); Unit ifinst = Baf.v().newIfNullInst(sii); units.insertBeforeNoRedirect(ifinst, sii); units.insertAfter(Baf.v().newThrowInst(), ifinst); units.insertAfter(Baf.v().newPushInst(NullConstant.v()), ifinst); Unit pop = Baf.v().newPopInst(RefType.v()); units.insertBefore(pop, sii); units.insertBeforeNoRedirect(Baf.v().newJSRInst(pop), pop); done = true; break;
clinitUnits.add(newStmt); } else { clinitUnits.insertBeforeNoRedirect(newStmt, firstStmt); clinitUnits.add(initStmt); } else { clinitUnits.insertBeforeNoRedirect(initStmt, firstStmt); clinitUnits.add(assignStmt); } else { clinitUnits.insertBeforeNoRedirect(assignStmt, firstStmt); units.insertBeforeNoRedirect(newPrep, firstUnit); } else { units.insertBefore(newPrep, tn.entermonitor); units.insertBefore(newPrep, tn.entermonitor); } else { units.insertBeforeNoRedirect(newPrep, tn.beginning); Jimple.v().newStaticFieldRef(globalLockObj[tn.setNumber].makeRef())); if (tn.wholeMethod) { units.insertBeforeNoRedirect(newPrep, firstUnit); } else { units.insertBefore(newPrep, tn.entermonitor); units.insertBeforeNoRedirect(newEntermonitor, csr.beginning); csr.entermonitor = newEntermonitor;
newUnits.insertBeforeNoRedirect(Jimple.v().newIdentityStmt(value, Jimple.v().newParameterRef(fieldSetGetType, 1)), replStmt);
/** Inserts <code>toInsert</code> in the Chain before <code>point</code>. */ public void insertBefore(List<E> toInsert, E point) { LinkedList<E> backwardList = new LinkedList<E>(); // Insert toInsert backwards into the list { Iterator<E> it = toInsert.iterator(); while(it.hasNext()) backwardList.addFirst(it.next()); } E previousPoint = point; Iterator<E> it = backwardList.iterator(); while (it.hasNext()) { E o = it.next(); insertBeforeNoRedirect(o, previousPoint); previousPoint = o; } point.redirectJumpsToThisTo(toInsert.get(0)); }
/** Inserts <code>toInsert</code> in the Chain before <code>point</code>. */ public void insertBefore(List<E> toInsert, E point) { LinkedList<E> backwardList = new LinkedList<E>(); // Insert toInsert backwards into the list { Iterator<E> it = toInsert.iterator(); while(it.hasNext()) backwardList.addFirst(it.next()); } E previousPoint = point; Iterator<E> it = backwardList.iterator(); while (it.hasNext()) { E o = it.next(); insertBeforeNoRedirect(o, previousPoint); previousPoint = o; } point.redirectJumpsToThisTo(toInsert.get(0)); }
((PatchingChain)units).insertBeforeNoRedirect(newTarget, firstTargetStmt);
((PatchingChain)units).insertBeforeNoRedirect(newTarget, firstTargetStmt);