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 =
(struct
let name = "Sparecode"
let size = 7
let dependencies = [ Ast.self; Db.Value.self ] (* delayed, see below *)
let dependencies = [ Ast.self; Eva.Analysis.self ] (* delayed, see below *)
end)
let () =
......
......@@ -81,7 +81,7 @@ module BoolInfo = struct
key_visible "label_visible" fm lab_key
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,
and the alarms table is not synchronized in the new project anyway *)
(* TODO: does not seem really coherent with the fact that almost everything
......@@ -126,13 +126,11 @@ module BoolInfo = struct
let called_info (project, _fm) call_stmt =
match call_stmt.skind with
| 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 =
match
Kernel_function.Hptset.contains_single_elt called_functions
with
| None -> None
| Some kf ->
match called_functions with
| [] | _ :: _ :: _ -> None
| [kf] ->
match Spare_marks.get_marks project kf with
| None ->
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