fix bugs to run without pool allocation like the ppopp paper experiments
[IRC.git] / Robust / src / IR / Flat / TempMap.java
1 package IR.Flat;
2 import java.util.Hashtable;
3
4 public class TempMap {
5   Hashtable<TempDescriptor, TempDescriptor> map;
6   public TempMap() {
7     map=new Hashtable<TempDescriptor, TempDescriptor>();
8   }
9
10   public boolean maps(TempDescriptor t) {
11     return map.containsKey(t);
12   }
13   public TempDescriptor tempMap(TempDescriptor t) {
14     if (t==null)
15       return null;
16     else if (map.containsKey(t))
17       return map.get(t);
18     else
19       return t;
20   }
21   public void addPair(TempDescriptor t1, TempDescriptor t2) {
22     map.put(t1,t2);
23   }
24 }