4 DECLARE_PTR_LIST(history_list
, struct state_history
);
10 struct smatch_state
*state
;
11 struct history_list
*line_history
;
12 struct state_list_stack
*pools
;
15 DECLARE_ALLOCATOR(sm_state
);
16 DECLARE_PTR_LIST(state_list
, struct sm_state
);
17 DECLARE_PTR_LIST(state_list_stack
, struct state_list
);
20 struct state_list
*slist
;
22 DECLARE_ALLOCATOR(named_slist
);
23 DECLARE_PTR_LIST(slist_stack
, struct named_slist
);
25 extern struct state_list_stack
*implied_pools
;
27 void add_history(struct sm_state
*state
);
28 struct sm_state
*alloc_state(const char *name
, int owner
,
30 struct smatch_state
*state
);
32 struct sm_state
*clone_state(struct sm_state
*s
);
33 struct state_list
*clone_slist(struct state_list
*from_slist
);
35 struct smatch_state
*merge_states(const char *name
, int owner
,
37 struct smatch_state
*state1
,
38 struct smatch_state
*state2
);
40 struct smatch_state
*get_state_slist(struct state_list
*slist
, const char *name
, int owner
,
43 struct sm_state
*get_sm_state_slist(struct state_list
*slist
, const char *name
, int owner
,
46 void set_state_slist(struct state_list
**slist
, const char *name
, int owner
,
47 struct symbol
*sym
, struct smatch_state
*state
);
49 void merge_state_slist(struct state_list
**slist
, const char *name
, int owner
,
50 struct symbol
*sym
, struct smatch_state
*state
);
52 void delete_state_slist(struct state_list
**slist
, const char *name
, int owner
,
55 struct smatch_state
*get_state_slist(struct state_list
*slist
, const char *name
, int owner
,
58 void push_slist(struct state_list_stack
**list_stack
, struct state_list
*slist
);
60 struct state_list
*pop_slist(struct state_list_stack
**list_stack
);
62 void del_slist(struct state_list
**slist
);
64 void del_slist_stack(struct state_list_stack
**slist_stack
);
66 void set_state_stack(struct state_list_stack
**stack
, const char *name
,
67 int owner
, struct symbol
*sym
, struct smatch_state
*state
);
69 struct smatch_state
*get_state_stack(struct state_list_stack
*stack
, const char *name
,
70 int owner
, struct symbol
*sym
);
72 void merge_slist(struct state_list
**to
, struct state_list
*slist
);
73 void filter(struct state_list
**slist
, struct state_list
*filter
);
74 void and_slist_stack(struct state_list_stack
**slist_stack
);
76 void or_slist_stack(struct state_list_stack
**slist_stack
);
78 struct state_list
**get_slist_from_slist_stack(struct slist_stack
*stack
,
81 void overwrite_slist(struct state_list
*from
, struct state_list
**to
);