public void validateLocalVariables() { Iterator<LocalVariable> it = getLocalVariables().iterator(); while (it.hasNext()) { LocalVariable lv = it.next(); if (!unitChain.contains(lv.getStartUnit())) throw new RuntimeException("start not in chain"+" in "+getMethod()); if (lv.getEndUnit() != null && !unitChain.contains(lv.getEndUnit())) throw new RuntimeException("end not in chain"+" in "+getMethod()); } }
public void validateLocalVariables() { Iterator<LocalVariable> it = getLocalVariables().iterator(); while (it.hasNext()) { LocalVariable lv = it.next(); if (!unitChain.contains(lv.getStartUnit())) throw new RuntimeException("start not in chain"+" in "+getMethod()); if (lv.getEndUnit() != null && !unitChain.contains(lv.getEndUnit())) throw new RuntimeException("end not in chain"+" in "+getMethod()); } }
/** * Finds a {@link LocalVariable} with the specified local variable index * at the specified {@link Unit} or {@code null} if none was found. * RoboVM note: Added in RoboVM. */ private LocalVariable findLocalVariable(Body body, int index, Unit unit) { PatchingChain<Unit> units = body.getUnits(); for (LocalVariable lv : body.getLocalVariables()) { if (lv.getIndex() == index) { if ((unit == lv.getStartUnit() || units.follows(unit, lv.getStartUnit())) && (lv.getEndUnit() == null || units.follows(lv.getEndUnit(), unit))) { return lv; } } } return null; } }
/** * Finds a {@link LocalVariable} with the specified local variable index * at the specified {@link Unit} or {@code null} if none was found. * RoboVM note: Added in RoboVM. */ private LocalVariable findLocalVariable(Body body, int index, Unit unit) { PatchingChain<Unit> units = body.getUnits(); for (LocalVariable lv : body.getLocalVariables()) { if (lv.getIndex() == index) { if ((unit == lv.getStartUnit() || units.follows(unit, lv.getStartUnit())) && (lv.getEndUnit() == null || units.follows(lv.getEndUnit(), unit))) { return lv; } } } return null; } }
Iterator lvsIt = body.getLocalVariables().iterator();
Iterator lvsIt = body.getLocalVariables().iterator();