diff --git a/src/plugins/sparecode/register.ml b/src/plugins/sparecode/register.ml index a6c985c0dc8ebfa6dc8f75311a28460c62ad48b9..a6a1fa9a5bfab44f202049b1b4c4b67773b30e78 100644 --- a/src/plugins/sparecode/register.ml +++ b/src/plugins/sparecode/register.ml @@ -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 () = diff --git a/src/plugins/sparecode/transform.ml b/src/plugins/sparecode/transform.ml index ce447c3fb94eecd147f1fd0adf0f111c4854a471..8c9fb9a68f6d4fde5b84a591d0600cfa59161639 100644 --- a/src/plugins/sparecode/transform.ml +++ b/src/plugins/sparecode/transform.ml @@ -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