From a96c9e10cec6b8af30dd1c70214ec9b6db66645f Mon Sep 17 00:00:00 2001 From: Son Ho Date: Fri, 28 Jan 2022 11:20:47 +0100 Subject: Change the type of [Pure.call.args] to [expression list] rather than [typed_rvalue list] --- src/PureMicroPasses.ml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/PureMicroPasses.ml') diff --git a/src/PureMicroPasses.ml b/src/PureMicroPasses.ml index 4ee67011..80d4e8bf 100644 --- a/src/PureMicroPasses.ml +++ b/src/PureMicroPasses.ml @@ -133,11 +133,6 @@ let compute_pretty_names (def : fun_def) : fun_def = (ctx : pn_ctx) : pn_ctx = match mp with None -> ctx | Some mp -> add_right_constraint mp rv ctx in - let add_opt_right_constraint_list ctx rvs = - List.fold_left - (fun ctx (mp, rv) -> add_opt_right_constraint mp rv ctx) - ctx rvs - in let add_left_constraint (lv : typed_lvalue) (ctx : pn_ctx) : pn_ctx = let obj = object (self) @@ -171,10 +166,12 @@ let compute_pretty_names (def : fun_def) : fun_def = (ctx, Value (v, mp)) (* *) and update_call (call : call) (ctx : pn_ctx) : pn_ctx * expression = - let ctx = - add_opt_right_constraint_list ctx - (List.combine call.args_mplaces call.args) + let ctx, args = + List.fold_left_map + (fun ctx arg -> update_expression arg ctx) + ctx call.args in + let call = { call with args } in (ctx, Call call) (* *) and update_let (lv : typed_lvalue) (re : expression) (e : expression) -- cgit v1.2.3