bug fixes
[IRC.git] / Robust / src / IR / Tree / TagExpressionList.java
1 package IR.Tree;
2 import java.util.Vector;
3 import IR.Flat.TempDescriptor;
4
5 public class TagExpressionList {
6     Vector names;
7     Vector types;
8     Vector temps;
9
10     public TagExpressionList() {
11         names=new Vector();
12         types=new Vector();
13         temps=new Vector();
14     }
15     
16     public void addTag(String type, String name) {
17         types.add(type);
18         names.add(name);
19     }
20
21     public int numTags() {
22         return names.size();
23     }
24
25     public void setTemp(int i, TempDescriptor tmp) {
26         if (i>=temps.size())
27             temps.setSize(i+1);
28         temps.set(i, tmp);
29     }
30
31     public TempDescriptor getTemp(int i) {
32         return (TempDescriptor) temps.get(i);
33     }
34
35     public String getName(int i) {
36         return (String) names.get(i);
37     }
38
39     public String getType(int i) {
40         return (String) types.get(i);
41     }
42 }
43