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;
25 private int numclasses=0;
28 public static TypeDescriptor getTypeDescriptor(int t) {
29 TypeDescriptor td=new TypeDescriptor(t);
33 public static TypeDescriptor getTypeDescriptor(NameDescriptor n) {
34 TypeDescriptor td=new TypeDescriptor(n);
38 public void addClass(ClassDescriptor tdn) {
39 if (classes.contains(tdn.getSymbol()))
40 throw new Error("Class "+tdn.getSymbol()+" defined twice");
45 public int numClasses() {
49 public BlockNode getMethodBody(MethodDescriptor md) {
50 return (BlockNode)treemethodmap.get(md);
53 public SymbolTable getClassSymbolTable() {
57 public FlatMethod getMethodFlat(MethodDescriptor md) {
58 return (FlatMethod)flatmethodmap.get(md);
61 public void addTreeCode(MethodDescriptor md, BlockNode bn) {
62 treemethodmap.put(md,bn);
65 public void addFlatCode(MethodDescriptor md, FlatMethod bn) {
66 flatmethodmap.put(md,bn);