11 this.classes=new SymbolTable();
12 this.treemethodmap=new Hashtable();
13 this.flatmethodmap=new Hashtable();
14 this.parsetrees=new HashSet();
15 this.arraytypes=new HashSet();
16 this.arraytonumber=new Hashtable();
19 public void addParseNode(ParseNode parsetree) {
20 parsetrees.add(parsetree);
23 public SymbolTable classes;
24 public Set parsetrees;
25 public Hashtable treemethodmap;
26 public Hashtable flatmethodmap;
27 private HashSet arraytypes;
28 public Hashtable arraytonumber;
29 private int numclasses=0;
30 private int arraycount=0;
32 public void addArrayType(TypeDescriptor td) {
34 arraytonumber.put(td,new Integer(arraycount++));
37 public Iterator getArrayIterator() {
38 return arraytypes.iterator();
41 public int getArrayNumber(TypeDescriptor td) {
42 return ((Integer)arraytonumber.get(td)).intValue();
45 public int numArrays() {
46 return arraytypes.size();
49 public static TypeDescriptor getTypeDescriptor(int t) {
50 TypeDescriptor td=new TypeDescriptor(t);
54 public static TypeDescriptor getTypeDescriptor(NameDescriptor n) {
55 TypeDescriptor td=new TypeDescriptor(n);
59 public void addClass(ClassDescriptor tdn) {
60 if (classes.contains(tdn.getSymbol()))
61 throw new Error("Class "+tdn.getSymbol()+" defined twice");
66 public int numClasses() {
70 public BlockNode getMethodBody(MethodDescriptor md) {
71 return (BlockNode)treemethodmap.get(md);
74 public SymbolTable getClassSymbolTable() {
78 public FlatMethod getMethodFlat(MethodDescriptor md) {
79 return (FlatMethod)flatmethodmap.get(md);
82 public void addTreeCode(MethodDescriptor md, BlockNode bn) {
83 treemethodmap.put(md,bn);
86 public void addFlatCode(MethodDescriptor md, FlatMethod bn) {
87 flatmethodmap.put(md,bn);