Skip to content

Commit

Permalink
Avoid doing Analyses.ask_of_ctx ctx for each exp in a list
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh committed Jan 9, 2024
1 parent bd5d65d commit 76e5d38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/analyses/base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,9 @@ struct

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

0 comments on commit 76e5d38

Please sign in to comment.