more bugs
[IRC.git] / Robust / src / Analysis / TaskStateAnalysis / TaskIndex.java
index 02b64190c7de2bd3f8353b48f6c44832c41e3996..84f21d0d047a3b66ac3f5f2614ca1a311a5bc4ca 100644 (file)
@@ -4,18 +4,33 @@ import IR.TaskDescriptor;
 public class TaskIndex {
     TaskDescriptor td;
     int index;
+    boolean runtime;
     public TaskIndex(TaskDescriptor td, int index) {
        this.td=td;
        this.index=index;
+       runtime=false;
+    }
+
+    public TaskIndex() {
+       runtime=true;
+    }
+
+    public boolean isRuntime() {
+       return runtime;
     }
 
     public int hashCode() {
+       if (runtime)
+           return 71;
        return td.hashCode()^index;
     }
 
     public boolean equals(Object o) {
        if (o instanceof TaskIndex) {
            TaskIndex ti=(TaskIndex) o;
+           if (ti.runtime==runtime)
+               return true;
+
            if (ti.index==index && ti.td==td)
                return true;
        }