Skip to content
Snippets Groups Projects
Commit 9ce2d726 authored by Valentin Perrelle's avatar Valentin Perrelle Committed by David Bühler
Browse files

[Sparecode] Use the new Eva API

parent 2ff2492a
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ module Result = ...@@ -35,7 +35,7 @@ module Result =
(struct (struct
let name = "Sparecode" let name = "Sparecode"
let size = 7 let size = 7
let dependencies = [ Ast.self; Db.Value.self ] (* delayed, see below *) let dependencies = [ Ast.self; Eva.Analysis.self ] (* delayed, see below *)
end) end)
let () = let () =
......
...@@ -81,7 +81,7 @@ module BoolInfo = struct ...@@ -81,7 +81,7 @@ module BoolInfo = struct
key_visible "label_visible" fm lab_key key_visible "label_visible" fm lab_key
let annotation_visible _ stmt annot = let annotation_visible _ stmt annot =
Db.Value.is_reachable_stmt stmt && Alarms.find annot = None Eva.Results.is_reachable stmt && Alarms.find annot = None
(* Keep annotations on reachable, but not alarms: they can be resynthesized, (* Keep annotations on reachable, but not alarms: they can be resynthesized,
and the alarms table is not synchronized in the new project anyway *) and the alarms table is not synchronized in the new project anyway *)
(* TODO: does not seem really coherent with the fact that almost everything (* TODO: does not seem really coherent with the fact that almost everything
...@@ -126,13 +126,11 @@ module BoolInfo = struct ...@@ -126,13 +126,11 @@ module BoolInfo = struct
let called_info (project, _fm) call_stmt = let called_info (project, _fm) call_stmt =
match call_stmt.skind with match call_stmt.skind with
| Instr (Call (_, _, _, _) | Local_init(_, ConsInit _, _)) -> | Instr (Call (_, _, _, _) | Local_init(_, ConsInit _, _)) ->
let called_functions = Db.Value.call_to_kernel_function call_stmt in let called_functions = Eva.Results.callee call_stmt in
let call_info = let call_info =
match match called_functions with
Kernel_function.Hptset.contains_single_elt called_functions | [] | _ :: _ :: _ -> None
with | [kf] ->
| None -> None
| Some kf ->
match Spare_marks.get_marks project kf with match Spare_marks.get_marks project kf with
| None -> | None ->
if Spare_marks.kf_visible project kf if Spare_marks.kf_visible project kf
......
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