forgot these two files
[IRC.git] / Robust / src / IR / Flat / TempTagPair.java
1 package IR.Flat;
2 import IR.TagVarDescriptor;
3
4 public class TempTagPair {
5     TagVarDescriptor tvd;
6     TempDescriptor td;
7
8     public TempTagPair(TempDescriptor td, TagVarDescriptor tvd) {
9         this.tvd=tvd;
10         this.td=td;
11     }
12     public int hashCode() {
13         if (tvd!=null)
14             return tvd.hashCode()^td.hashCode();
15         else
16             return td.hashCode();
17     }
18
19     public TempDescriptor getTemp() {
20         return td;
21     }
22
23     public TagVarDescriptor getTag() {
24         return tvd;
25     }
26
27     public boolean equals(Object o) {
28         if (!(o instanceof TempTagPair))
29             return false;
30         TempTagPair ttp=(TempTagPair)o;
31         return ttp.tvd==tvd&&(ttp.td==td);
32     }
33
34     public String toString() {
35         return "<"+tvd+","+td+">";
36     }
37 }