crap crap crap. do not use.
[smatch.git] / smatch_slist.h
blobe86b301138ce40c4cf1e6a9a2abf16fdad1432d5
1 DECLARE_ALLOCATOR(smatch_state);
2 DECLARE_PTR_LIST(state_list, struct smatch_state);
3 DECLARE_PTR_LIST(state_list_stack, struct state_list);
4 struct named_slist {
5 char *name;
6 struct state_list *slist;
7 };
8 DECLARE_ALLOCATOR(named_slist);
9 DECLARE_PTR_LIST(slist_stack, struct named_slist);
11 extern struct state_list *cur_slist; /* current states */
13 void add_history(struct smatch_state *state);
14 struct smatch_state *alloc_state(const char *name, int owner,
15 struct symbol *sym, int state);
17 struct smatch_state *clone_state(struct smatch_state *s);
18 struct state_list *clone_slist(struct state_list *from_slist);
20 int merge_states(const char *name, int owner, struct symbol *sym,
21 int state1, int state2);
22 void merge_state_slist(struct state_list **slist, const char *name, int owner,
23 struct symbol *sym, int state);
25 int get_state_slist(struct state_list *slist, const char *name, int owner,
26 struct symbol *sym);
28 void add_state_slist(struct state_list **slist, struct smatch_state *state);
30 void set_state_slist(struct state_list **slist, const char *name, int owner,
31 struct symbol *sym, int state);
33 void merge_state_slist(struct state_list **slist, const char *name, int owner,
34 struct symbol *sym, int state);
36 void delete_state_slist(struct state_list **slist, const char *name, int owner,
37 struct symbol *sym);
39 int get_state_slist(struct state_list *slist, const char *name, int owner,
40 struct symbol *sym);
42 void push_slist(struct state_list_stack **list_stack, struct state_list *slist);
44 struct state_list *pop_slist(struct state_list_stack **list_stack);
46 void del_slist(struct state_list **slist);
48 void del_slist_stack(struct state_list_stack **slist_stack);
50 void set_state_stack(struct state_list_stack **stack, const char *name,
51 int owner, struct symbol *sym, int state);
53 int get_state_stack(struct state_list_stack *stack, const char *name,
54 int owner, struct symbol *sym);
56 void merge_state_stack(struct state_list_stack **stack, const char *name,
57 int owner, struct symbol *sym, int state);
59 void merge_slist(struct state_list *slist);
60 void merge_slist_new(struct state_list *slist);
61 void and_slist_stack(struct state_list_stack **slist_stack,
62 struct state_list *tmp_slist);
64 void or_slist_stack(struct state_list_stack **slist_stack);
66 struct state_list *get_slist_from_slist_stack(struct slist_stack *stack,
67 const char *name);
69 void overwrite_slist(struct state_list *from, struct state_list **to);