Make goto_stack static.
[smatch.git] / smatch_slist.h
blob4492b4837b6d3c3dd2e67080032cd6f922e96c27
1 struct state_history {
2 unsigned int loc;
3 };
4 DECLARE_PTR_LIST(history_list, struct state_history);
6 struct sm_state {
7 char *name;
8 unsigned int owner;
9 struct symbol *sym;
10 struct smatch_state *state;
11 struct history_list *line_history;
12 struct history_list *path_history;
15 DECLARE_ALLOCATOR(sm_state);
16 DECLARE_PTR_LIST(state_list, struct sm_state);
17 DECLARE_PTR_LIST(state_list_stack, struct state_list);
18 struct named_slist {
19 char *name;
20 struct state_list *slist;
22 DECLARE_ALLOCATOR(named_slist);
23 DECLARE_PTR_LIST(slist_stack, struct named_slist);
25 void add_history(struct sm_state *state);
26 struct sm_state *alloc_state(const char *name, int owner,
27 struct symbol *sym,
28 struct smatch_state *state);
30 struct sm_state *clone_state(struct sm_state *s);
31 struct state_list *clone_slist(struct state_list *from_slist);
33 struct smatch_state *merge_states(const char *name, int owner,
34 struct symbol *sym,
35 struct smatch_state *state1,
36 struct smatch_state *state2);
38 struct smatch_state *get_state_slist(struct state_list *slist, const char *name, int owner,
39 struct symbol *sym);
41 void set_state_slist(struct state_list **slist, const char *name, int owner,
42 struct symbol *sym, struct smatch_state *state);
44 void merge_state_slist(struct state_list **slist, const char *name, int owner,
45 struct symbol *sym, struct smatch_state *state);
47 void delete_state_slist(struct state_list **slist, const char *name, int owner,
48 struct symbol *sym);
50 struct smatch_state *get_state_slist(struct state_list *slist, const char *name, int owner,
51 struct symbol *sym);
53 void push_slist(struct state_list_stack **list_stack, struct state_list *slist);
55 struct state_list *pop_slist(struct state_list_stack **list_stack);
57 void del_slist(struct state_list **slist);
59 void del_slist_stack(struct state_list_stack **slist_stack);
61 void set_state_stack(struct state_list_stack **stack, const char *name,
62 int owner, struct symbol *sym, struct smatch_state *state);
64 struct smatch_state *get_state_stack(struct state_list_stack *stack, const char *name,
65 int owner, struct symbol *sym);
67 void merge_slist(struct state_list **to, struct state_list *slist);
68 void filter(struct state_list **slist, struct state_list *filter);
69 void and_slist_stack(struct state_list_stack **slist_stack);
71 void or_slist_stack(struct state_list_stack **slist_stack);
73 struct state_list **get_slist_from_slist_stack(struct slist_stack *stack,
74 const char *name);
76 void overwrite_slist(struct state_list *from, struct state_list **to);