let resolv_func_vinfo ~with_alarms deps state funcexp =
match funcexp.enode with
| Lval (Var vinfo,NoOffset) ->
Kernel_function.Hptset.singleton (Globals.Functions.get vinfo), deps
| Lval (Mem v,NoOffset) ->
let deps, loc = eval_expr_with_deps ~with_alarms deps state v in
let fundecs = List.fold_left
(fun acc varid ->
match varid with
| Base.String (_,_) ->
warning_once_current
"Function pointer call at string position in memory: ignoring this particular value: assert(TODO)";
acc
| Base.Null ->
warning_once_current
"Function pointer call at absolute position in memory: ignoring this particular value: assert(TODO)";
acc
| Base.Var (v,_) | Base.Initialized_Var (v,_) ->
Kernel_function.Hptset.add (Globals.Functions.get v) acc
)
Kernel_function.Hptset.empty
(try Location_Bytes.get_keys_exclusive Ival.zero loc
with Location_Bytes.Not_all_keys ->
warning_once_current
"Function pointer call is completely unknown: assuming no effects: assert(TODO)";
raise Leaf)
in
fundecs, deps
| _ ->
assert false