typedef struct symbol *SYMBOL; /* * symbol_lookup() finds the SYMBOL object for a given text identifier. * If the symbol is not previously known, it creates it. * It only returns NULL for out of memory. */ extern SYMBOL symbol_lookup(char *id); /* * symbol_getname() yields the original text identifier for a symbol. */ extern char *symbol_getname(SYMBOL x); extern int symbol_count(); /* return number of symbols created so far */ extern void symbol_set_seen(SYMBOL x, int stmt); extern int live_range_is_overlapping(SYMBOL x, SYMBOL y); /* boolean */ /* * We also need to be able to manipulate an "index" value representing this * symbol's position in the graph data structure. */ extern void symbol_setindex(SYMBOL x, int i); extern int symbol_getindex(SYMBOL x); /* iterator class to traverse all symbols */ typedef struct symbol_iter *SYMBOL_ITER; extern SYMBOL_ITER new_symbol_iter(); extern SYMBOL first_symbol(SYMBOL_ITER x), next_symbol(SYMBOL_ITER x);