last = make().If(cond, block, last);
return last;
}
private Name getLabel(Tree.Directive dir) {
Scope scope = dir.getScope();
while (!(scope instanceof Package)) {
if (scope instanceof ControlBlock) {
Integer loopId = gen().visitor.lv.getLoopId((ControlBlock)scope);
if (loopId != null) {
return names().fromString("loop_"+loopId);
}
}
scope = scope.getContainer();
}
throw new BugException(dir, "failed to find label");
}