Skip to content
Snippets Groups Projects
Commit b80729cf authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[wp] avoid calling RefUsage from context menu

parent 042194ec
No related branches found
No related tags found
No related merge requests found
...@@ -406,7 +406,7 @@ let model_varinfo : ...@@ -406,7 +406,7 @@ let model_varinfo :
match item with match item with
| PLval(Some kf, _ , (Var x,NoOffset)) | PLval(Some kf, _ , (Var x,NoOffset))
| PTermLval(Some kf, _, _, (TVar {lv_origin=Some x},TNoOffset)) | PTermLval(Some kf, _, _, (TVar {lv_origin=Some x},TNoOffset))
when button=1 -> when button=1 && RefUsage.is_computed () ->
begin begin
let init = WpStrategy.is_main_init kf in let init = WpStrategy.is_main_init kf in
let acc = RefUsage.get ~kf ~init x in let acc = RefUsage.get ~kf ~init x in
......
...@@ -817,6 +817,7 @@ module S = State_builder.Option_ref(D) ...@@ -817,6 +817,7 @@ module S = State_builder.Option_ref(D)
(* compute_usage is called once per project *) (* compute_usage is called once per project *)
let usage () = S.memo compute_usage let usage () = S.memo compute_usage
let is_computed () = S.is_computed ()
(* ---------------------------------------------------------------------- *) (* ---------------------------------------------------------------------- *)
(* --- API --- *) (* --- API --- *)
......
...@@ -41,3 +41,4 @@ val iter: ?kf:kernel_function -> ?init:bool -> (varinfo -> access -> unit) -> un ...@@ -41,3 +41,4 @@ val iter: ?kf:kernel_function -> ?init:bool -> (varinfo -> access -> unit) -> un
val print : varinfo -> access -> Format.formatter -> unit val print : varinfo -> access -> Format.formatter -> unit
val dump : unit -> unit val dump : unit -> unit
val compute : unit -> unit val compute : unit -> unit
val is_computed : unit -> bool
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment