--- /dev/null
+package IR.Flat;
+import java.util.Vector;
+
+public class FlatCondBranch extends FlatNode {
+ TempDescriptor test_cond;
+
+ public FlatCondBranch(TempDescriptor td) {
+ test_cond=td;
+ }
+
+ public void addTrueNext(FlatNode n) {
+ next.setElementAt(n,0);
+ }
+
+ public void addFalseNext(FlatNode n) {
+ next.setElementAt(n,1);
+ }
+
+ public void addNext(FlatNode n) {
+ throw new Error();
+ }
+}
--- /dev/null
+package IR.Flat;
+import java.util.Vector;
+
+public class FlatNop extends FlatNode {
+ public FlatNop() {
+ }
+
+ public String toString() {
+ return "nop";
+ }
+}
--- /dev/null
+package IR.Flat;
+import IR.*;
+
+public class TempDescriptor {
+ static int currentid=0;
+ int id;
+ String safename;
+
+ public TempDescriptor(String name) {
+ safename="__"+name+"__";
+ id=currentid++;
+ }
+
+ public static TempDescriptor tempFactory() {
+ return new TempDescriptor("temp_"+currentid);
+ }
+
+ public static TempDescriptor tempFactory(String name) {
+ return new TempDescriptor(name+currentid);
+ }
+
+ public String toString() {
+ return safename;
+ }
+}