Skip to content
Snippets Groups Projects
Commit 1f67c1ba authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Split structures too.

parent 5214ec6c
No related branches found
No related tags found
No related merge requests found
(** Time-stamp: <modified the 04/11/2008 (at 16:48) by Erwan Jahier> *)
(** Time-stamp: <modified the 04/11/2008 (at 16:59) by Erwan Jahier> *)
open Lxm
......@@ -137,8 +137,18 @@ and (split_val_exp : bool -> Eff.val_exp -> Eff.val_exp * split_acc) =
(* We do not create an intermediary variable for those *)
-> ve, ([],[])
| CallByNameEff (_by_name_op_eff, _fl) ->
ve, ([],[]) (* but what about that one ??? *)
| CallByNameEff (by_name_op_eff, fl) ->
let fl, eql, vl =
List.fold_left
(fun (fl_acc, eql_acc, vl_acc) (fn, fv) ->
let fv, (eql, vl) = split_val_exp false fv in
((fn,fv)::fl_acc, eql@eql_acc, vl@vl_acc)
)
([],[],[])
fl
in
CallByNameEff (by_name_op_eff, List.rev fl), (eql, vl)
| CallByPosEff(by_pos_op_eff, OperEff vel) ->
(* recursively split the arguments *)
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment