@ -391,32 +391,31 @@ module Make (Dom : Domain_sig.Dom) = struct
| Some state -> exec_jump stk state block jump | > Work . seq x
| Some state -> exec_jump stk state block jump | > Work . seq x
| None -> x )
| None -> x )
| Call ( { callee ; args ; areturn ; return } as call ) -> (
| Call ( { callee ; args ; areturn ; return } as call ) -> (
match
let lookup name =
let lookup name =
Option . to_list ( Llair . Func . find pgm . functions name )
Option . to_list ( Llair . Func . find pgm . functions name )
in
in
Dom . resolve_callee lookup callee state
let callees , state = Dom . resolve_callee lookup callee state in
with
match callees with
| [] -> exec_skip_func stk state block areturn return
| [] -> exec_skip_func stk state block areturn return
| callees ->
| callees ->
List . fold callees ~ init : Work . skip ~ f : ( fun x callee ->
List . fold callees ~ init : Work . skip ~ f : ( fun x callee ->
( match
( match
Dom . exec_intrinsic ~ skip_throw : opts . skip_throw state
Dom . exec_intrinsic ~ skip_throw : opts . skip_throw state
areturn callee . name . var args
areturn callee . name . var args
with
with
| Some ( Error () ) ->
| Some ( Error () ) ->
Report . invalid_access_term
Report . invalid_access_term
( Dom . report_fmt_thunk state )
( Dom . report_fmt_thunk state )
block . term ;
block . term ;
Work . skip
Work . skip
| Some ( Ok state ) when Dom . is_false state -> Work . skip
| Some ( Ok state ) when Dom . is_false state -> Work . skip
| Some ( Ok state ) -> exec_jump stk state block return
| Some ( Ok state ) -> exec_jump stk state block return
| None when Llair . Func . is_undefined callee ->
| None when Llair . Func . is_undefined callee ->
exec_skip_func stk state block areturn return
exec_skip_func stk state block areturn return
| None ->
| None ->
exec_call opts stk state block { call with callee }
exec_call opts stk state block { call with callee }
pgm . globals )
pgm . globals )
| > Work . seq x ) )
| > Work . seq x ) )
| Return { exp } -> exec_return ~ opts stk state block exp pgm . globals
| Return { exp } -> exec_return ~ opts stk state block exp pgm . globals
| Throw { exc } ->
| Throw { exc } ->
if opts . skip_throw then Work . skip
if opts . skip_throw then Work . skip