for (ScopeBlock child : children) { if (child.usesReg(reg)) { if (child.isLoop || child.isSync() || child.isTry()) { inIgnoreSB = true; break;
for (ScopeBlock child : children) { if (child.usesReg(reg)) { if (child.isLoop || child.isSync() || child.isTry()) { inIgnoreSB = true; break;
/** * finds the scope block that is the active synchronized block * * @param sb * the parent scope block to start with * @param monitorEnterPC * the pc where the current synchronized block starts * @return the scope block */ private ScopeBlock findSynchronizedScopeBlock(ScopeBlock sb, int monitorEnterPC) { ScopeBlock monitorBlock = sb; if (sb.hasChildren()) { for (ScopeBlock child : sb.getChildren()) { if (child.isSync() && (child.getStart() > monitorBlock.getStart())) { monitorBlock = child; monitorBlock = findSynchronizedScopeBlock(monitorBlock, monitorEnterPC); } } } return monitorBlock; }
/** * finds the scope block that is the active synchronized block * * @param sb * the parent scope block to start with * @param monitorEnterPC * the pc where the current synchronized block starts * @return the scope block */ private ScopeBlock findSynchronizedScopeBlock(ScopeBlock sb, int monitorEnterPC) { ScopeBlock monitorBlock = sb; if (sb.hasChildren()) { for (ScopeBlock child : sb.getChildren()) { if (child.isSync() && (child.getStart() > monitorBlock.getStart())) { monitorBlock = child; monitorBlock = findSynchronizedScopeBlock(monitorBlock, monitorEnterPC); } } } return monitorBlock; }