DalvInsn instruction= instructions.get(i);
int address= instruction.getAddress();
// Determine whether to add the next instruction to the
// codeElement or to a try block.
Entry currentCatch= null;
int tryElementIndex= 0;
for (tryElementIndex= 0; tryElementIndex < catches.size(); ++tryElementIndex)
{
if (isInstructionInCatchRange(instruction, catches.get(tryElementIndex)))
{
instructionParent= tryElements.get(tryElementIndex);
currentCatch= catches.get(tryElementIndex);
break;
}
}
// Adds a label element for each target we extracted earlier.
if (targets.containsKey(address))
{
Element labelElement= new Element("label", NS_DEX);
labelElement.setAttribute("id", String.valueOf(address));
if (currentCatch != null)
{
// Labels at the beginning of a try block need to be
// moved in front of it.
if (currentCatch.getStart() == address)
{
codeElement.addContent(labelElement);
}
else if (targets.get(address).requiresSplit)
{