11 this.classes=new SymbolTable();
12 this.treemethodmap=new Hashtable();
13 this.flatmethodmap=new Hashtable();
14 this.parsetrees=new HashSet();
17 public void addParseNode(ParseNode parsetree) {
18 parsetrees.add(parsetree);
21 public SymbolTable classes;
22 public Set parsetrees;
23 public Hashtable treemethodmap;
24 public Hashtable flatmethodmap;
26 public static TypeDescriptor getTypeDescriptor(int t) {
27 TypeDescriptor td=new TypeDescriptor(t);
31 public static TypeDescriptor getTypeDescriptor(NameDescriptor n) {
32 TypeDescriptor td=new TypeDescriptor(n);
36 public void addClass(ClassDescriptor tdn) {
37 if (classes.contains(tdn.getSymbol()))
38 throw new Error("Class "+tdn.getSymbol()+" defined twice");
42 public BlockNode getMethodBody(MethodDescriptor md) {
43 return (BlockNode)treemethodmap.get(md);
46 public SymbolTable getClassSymbolTable() {
50 public FlatMethod getMethodFlat(MethodDescriptor md) {
51 return (FlatMethod)flatmethodmap.get(md);
54 public void addTreeCode(MethodDescriptor md, BlockNode bn) {
55 treemethodmap.put(md,bn);
58 public void addFlatCode(MethodDescriptor md, FlatMethod bn) {
59 flatmethodmap.put(md,bn);