}
protected void runEditor(ExprEditor ed, CodeIterator oldIterator)
throws CannotCompileException
{
CodeAttribute codeAttr = oldIterator.get();
int orgLocals = codeAttr.getMaxLocals();
int orgStack = codeAttr.getMaxStack();
int newLocals = locals();
codeAttr.setMaxStack(stack());
codeAttr.setMaxLocals(newLocals);
ExprEditor.LoopContext context
= new ExprEditor.LoopContext(newLocals);
int size = oldIterator.getCodeLength();
int endPos = oldIterator.lookAhead();
oldIterator.move(currentPos);
if (ed.doit(thisClass, thisMethod, context, oldIterator, endPos))
edited = true;
oldIterator.move(endPos + oldIterator.getCodeLength() - size);
codeAttr.setMaxLocals(orgLocals);
codeAttr.setMaxStack(orgStack);
maxLocals = context.maxLocals;
maxStack += context.maxStack;
}