From 54bc4689279ad6709eb29999f278885eb9df51f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr>
Date: Wed, 16 Feb 2022 11:21:14 +0100
Subject: [PATCH] In plugins using Eva, uses [Eva.Analysis.compute] instead of
 [Db.Value.compute].

---
 src/plugins/callgraph/cg.ml             | 2 +-
 src/plugins/from/callwise.ml            | 2 +-
 src/plugins/from/from_compute.ml        | 2 +-
 src/plugins/from/functionwise.ml        | 2 +-
 src/plugins/inout/operational_inputs.ml | 2 +-
 src/plugins/users/users_register.ml     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/plugins/callgraph/cg.ml b/src/plugins/callgraph/cg.ml
index 5d8feaafee1..09141915660 100644
--- a/src/plugins/callgraph/cg.ml
+++ b/src/plugins/callgraph/cg.ml
@@ -228,7 +228,7 @@ let compute () =
   (* optimize with [Value] when either it is already computed or someone
      requires it anyway *)
   if Dynamic.Parameter.Bool.get "-eva" () then begin
-    !Db.Value.compute ();
+    Eva.Analysis.compute ();
     semantic_compute g
   end else
     (if Eva.Analysis.is_computed () then semantic_compute else syntactic_compute) g;
diff --git a/src/plugins/from/callwise.ml b/src/plugins/from/callwise.ml
index bb21f3ad2de..0ca2714df0c 100644
--- a/src/plugins/from/callwise.ml
+++ b/src/plugins/from/callwise.ml
@@ -201,7 +201,7 @@ let force_compute_all_calldeps ()=
     Project.clear
       ~selection:(State_selection.with_dependencies Eva.Analysis.self)
       ();
-  !Db.Value.compute ()
+  Eva.Analysis.compute ()
 
 (* Registration for call-wise from *)
 let () =
diff --git a/src/plugins/from/from_compute.ml b/src/plugins/from/from_compute.ml
index fe9417bc98e..63a83684186 100644
--- a/src/plugins/from/from_compute.ml
+++ b/src/plugins/from/from_compute.ml
@@ -701,7 +701,7 @@ struct
     result
 
   let compute kf =
-    !Db.Value.compute ();
+    Eva.Analysis.compute ();
     ignore (compute_and_return kf)
 
 end
diff --git a/src/plugins/from/functionwise.ml b/src/plugins/from/functionwise.ml
index 55febbe07ef..85d2c9132dc 100644
--- a/src/plugins/from/functionwise.ml
+++ b/src/plugins/from/functionwise.ml
@@ -92,7 +92,7 @@ let () =
 
 
 let force_compute_all () =
-  !Db.Value.compute ();
+  Eva.Analysis.compute ();
   Callgraph.Uses.iter_in_rev_order
     (fun kf ->
        if Kernel_function.is_definition kf && !Db.Value.is_called kf
diff --git a/src/plugins/inout/operational_inputs.ml b/src/plugins/inout/operational_inputs.ml
index 72479112c15..ebeeb9ed96d 100644
--- a/src/plugins/inout/operational_inputs.ml
+++ b/src/plugins/inout/operational_inputs.ml
@@ -801,7 +801,7 @@ let get_internal =
     (fun kf ->
        Eva.Analysis.compute ();
        try Internals.find kf (* The results may have been computed by the call
-                                to Value.compute *)
+                                to Eva.Analysis.compute *)
        with
        | Not_found ->
          if!Db.Value.use_spec_instead_of_definition kf then
diff --git a/src/plugins/users/users_register.ml b/src/plugins/users/users_register.ml
index ddc6e05e41d..f54caf8bbda 100644
--- a/src/plugins/users/users_register.ml
+++ b/src/plugins/users/users_register.ml
@@ -53,7 +53,7 @@ let call_for_users (_state, call_stack) =
   | (current_function, _call_site) :: tail ->
     if tail = [] then begin
       (* End of Value analysis, we record that Users has run. We should not
-         do this after the explicit call to Db.Value.compute later in this
+         do this after the explicit call to Eva.Analysis.compute later in this
          file, as Value can run on its own and execute Users while doing so.*)
       Users.mark_as_computed ()
     end;
-- 
GitLab