1 DECLARE_ALLOCATOR(smatch_state
);
2 DECLARE_PTR_LIST(state_list
, struct smatch_state
);
3 DECLARE_PTR_LIST(state_list_stack
, struct state_list
);
6 struct state_list
*slist
;
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
,
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
,
39 int get_state_slist(struct state_list
*slist
, const char *name
, int owner
,
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
,
69 void overwrite_slist(struct state_list
*from
, struct state_list
**to
);