8 public State(ParseNode parsetree) {
9 globals=new SymbolTable();
10 this.parsetree=parsetree;
11 this.classset=new HashSet();
12 this.treemethodmap=new Hashtable();
13 this.flatmethodmap=new Hashtable();
16 public SymbolTable globals;
17 public ParseNode parsetree;
18 public HashSet classset;
19 public Hashtable treemethodmap;
20 public Hashtable flatmethodmap;
22 public static TypeDescriptor getTypeDescriptor(int t) {
23 TypeDescriptor td=new TypeDescriptor(t);
27 public static TypeDescriptor getTypeDescriptor(NameDescriptor n) {
28 TypeDescriptor td=new TypeDescriptor(n);
32 public void addClass(ClassDescriptor tdn) {
36 public BlockNode getMethodBody(MethodDescriptor md) {
37 return (BlockNode)treemethodmap.get(md);
41 public FlatMethod getMethodFlat(MethodDescriptor md) {
42 return (FlatMethod)flatmethodmap.get(md);
45 public void addTreeCode(MethodDescriptor md, BlockNode bn) {
46 treemethodmap.put(md,bn);
49 public void addFlatCode(MethodDescriptor md, FlatMethod bn) {
50 flatmethodmap.put(md,bn);