let resolv_func_vinfo ~with_alarms deps state funcexp =
match funcexp.enode with
| Lval (Var vinfo,NoOffset) -> deps, [ Globals.Functions.get vinfo]
| 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 (_,_) ->
Value_parameters.warning ~once:true ~current:true
"Function pointer call at string position in memory: ignoring this particular value: assert(TODO)";
acc
| Base.Null ->
Value_parameters.warning ~once:true ~current:true
"Function pointer call at absolute position in memory: ignoring this particular value: assert(TODO)";
acc
| Base.Cell_class _ ->
Value_parameters.warning ~once:true ~current:true
"Function pointer call at memory cell class: ignoring this particular value: assert(TODO)";
acc
| Base.Var (v,_) | Base.Initialized_Var (v,_) ->
Globals.Functions.get v :: acc
)
[]
(try
Location_Bytes.get_keys_exclusive Ival.zero loc
with Location_Bytes.Not_all_keys ->
Value_parameters.warning ~once:true ~current:true
"Function pointer call is completly unknown: assuming no effects: assert(TODO)";
raise Leaf)
in
deps, fundecs
| _ ->
assert false