}
private NodePair flattenLoopNode(LoopNode ln) {
+ HashSet oldbs=breakset;
+ HashSet oldcs=continueset;
+ breakset=new HashSet();
+ continueset=new HashSet();
+
if (ln.getType()==LoopNode.FORLOOP) {
NodePair initializer=flattenBlockNode(ln.getInitializer());
TempDescriptor cond_temp=TempDescriptor.tempFactory("condition", new TypeDescriptor(TypeDescriptor.BOOLEAN));
breakit.remove();
fn.addNext(nopend);
}
-
+ breakset=oldbs;
+ continueset=oldcs;
return new NodePair(begin,nopend);
} else if (ln.getType()==LoopNode.WHILELOOP) {
TempDescriptor cond_temp=TempDescriptor.tempFactory("condition", new TypeDescriptor(TypeDescriptor.BOOLEAN));
breakit.remove();
fn.addNext(nopend);
}
+ breakset=oldbs;
+ continueset=oldcs;
return new NodePair(begin,nopend);
} else if (ln.getType()==LoopNode.DOWHILELOOP) {
TempDescriptor cond_temp=TempDescriptor.tempFactory("condition", new TypeDescriptor(TypeDescriptor.BOOLEAN));
breakit.remove();
fn.addNext(nopend);
}
+ breakset=oldbs;
+ continueset=oldcs;
return new NodePair(begin,nopend);
} else throw new Error();
}