Skip to content

Commit 76e5d38

Browse files
committed
Avoid doing Analyses.ask_of_ctx ctx for each exp in a list
1 parent bd5d65d commit 76e5d38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/analyses/base.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,8 +1875,9 @@ struct
18751875

18761876
(** From a list of expressions, collect a list of addresses that they might point to, or contain pointers to. *)
18771877
let collect_funargs ~ctx ?(warn=false) (st:store) (exps: exp list) =
1878+
let ask = Analyses.ask_of_ctx ctx in
18781879
let do_exp e =
1879-
let immediately_reachable = reachable_from_value (Analyses.ask_of_ctx ctx) (eval_rv ~ctx st e) (Cilfacade.typeOf e) (CilType.Exp.show e) in
1880+
let immediately_reachable = reachable_from_value ask (eval_rv ~ctx st e) (Cilfacade.typeOf e) (CilType.Exp.show e) in
18801881
reachable_vars ~ctx st [immediately_reachable]
18811882
in
18821883
List.concat_map do_exp exps

0 commit comments

Comments
 (0)