/** * looks for the ScopeBlock has the same parent as this given one, but precedes it in the list. * * @param sb * the scope block to look for the previous scope block * @return the previous sibling scope block, or null if doesn't exist */ @Nullable private ScopeBlock findPreviousSiblingScopeBlock(ScopeBlock sb) { ScopeBlock parent = sb.getParent(); if (parent == null) { return null; } List<ScopeBlock> children = parent.getChildren(); if (children == null) { return null; } ScopeBlock lastSibling = null; for (ScopeBlock sibling : children) { if (sibling.equals(sb)) { return lastSibling; } lastSibling = sibling; } return null; }
/** * looks for the ScopeBlock has the same parent as this given one, but precedes it in the list. * * @param sb * the scope block to look for the previous scope block * @return the previous sibling scope block, or null if doesn't exist */ @Nullable private ScopeBlock findPreviousSiblingScopeBlock(ScopeBlock sb) { ScopeBlock parent = sb.getParent(); if (parent == null) { return null; } List<ScopeBlock> children = parent.getChildren(); if (children == null) { return null; } ScopeBlock lastSibling = null; for (ScopeBlock sibling : children) { if (sibling.equals(sb)) { return lastSibling; } lastSibling = sibling; } return null; }
if ((sb != null) && !sb.isLoop() && !sb.isCase() && !sb.hasChildren()) { if (sb.isGoto()) { ScopeBlock parent = sb.getParent(); sb.pushUpLoadStores(); if (parent != null) { ScopeBlock sb = findScopeBlock(rootScopeBlock, pc); if (sb != null) { ScopeBlock parentSB = sb.getParent(); while (parentSB != null) { if (parentSB.getStart() >= target) { sb = parentSB; parentSB = parentSB.getParent(); } else { break;
if ((sb != null) && !sb.isLoop() && !sb.isCase() && !sb.hasChildren()) { if (sb.isGoto()) { ScopeBlock parent = sb.getParent(); sb.pushUpLoadStores(); if (parent != null) { ScopeBlock sb = findScopeBlock(rootScopeBlock, pc); if (sb != null) { ScopeBlock parentSB = sb.getParent(); while (parentSB != null) { if (parentSB.getStart() >= target) { sb = parentSB; parentSB = parentSB.getParent(); } else { break;