checking in changes
[IRC.git] / Robust / src / IR / Flat / FlatCondBranch.java
1 package IR.Flat;
2 import java.util.Vector;
3
4 public class FlatCondBranch extends FlatNode {
5     TempDescriptor test_cond;
6
7     public FlatCondBranch(TempDescriptor td) {
8         test_cond=td;
9     }
10
11     public void addTrueNext(FlatNode n) {
12         next.setElementAt(n,0);
13         n.addPrev(this);
14     }
15
16     public void addFalseNext(FlatNode n) {
17         next.setElementAt(n,1);
18         n.addPrev(this);
19     }
20
21     public String toString() {
22         return "conditional branch";
23     }
24
25     public String toString(String negjump) {
26         return "if (!"+test_cond.toString()+") goto "+negjump;
27     }
28
29     public void addNext(FlatNode n) {
30         throw new Error();
31     }
32 }