2 import java.util.Vector;
4 public class FlatCondBranch extends FlatNode {
5 TempDescriptor test_cond;
7 public FlatCondBranch(TempDescriptor td) {
11 public void addTrueNext(FlatNode n) {
14 next.setElementAt(n,0);
18 public void addFalseNext(FlatNode n) {
20 next.setElementAt(n,1);
24 public TempDescriptor getTest() {
28 public String toString() {
29 return "conditional branch";
32 public String toString(String negjump) {
33 return "if (!"+test_cond.toString()+") goto "+negjump;
36 public void addNext(FlatNode n) {
41 return FKind.FlatCondBranch;
44 public TempDescriptor [] readsTemps() {
45 return new TempDescriptor[] {test_cond};