This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 package IR.Flat;
2 import IR.TagDescriptor;
3
4 public class TempTagPair {
5   TagDescriptor tagd;
6   TempDescriptor td;
7   TempDescriptor tagt;
8
9   public TempTagPair(TempDescriptor td, TagDescriptor tagd, TempDescriptor tagt) {
10     this.tagd=tagd;
11     this.tagt=tagt;
12     this.td=td;
13   }
14   public int hashCode() {
15     return td.hashCode()^tagt.hashCode();
16   }
17
18   public TempDescriptor getTemp() {
19     return td;
20   }
21
22   public TagDescriptor getTag() {
23     return tagd;
24   }
25
26   public TempDescriptor getTagTemp() {
27     return tagt;
28   }
29
30   public boolean equals(Object o) {
31     if (!(o instanceof TempTagPair))
32       return false;
33     TempTagPair ttp=(TempTagPair)o;
34     if (ttp.tagt==tagt&&ttp.td==td) {
35       if (ttp.tagd!=null) {
36         if (!ttp.tagd.equals(tagd))
37           throw new Error();
38       } else if (tagd!=null)
39         throw new Error();
40
41       return true;
42     } else return false;
43   }
44
45   public String toString() {
46     return "<"+td+","+tagd+","+tagt+">";
47   }
48 }