From 3153a8f24182077b22466fd41de2dfec3567dfef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Fri, 9 Jul 2010 10:28:16 +0200 Subject: [PATCH] Add missing cases --- compiler/heptagon/transformations/every.ml | 8 ++++++-- compiler/heptagon/transformations/last.ml | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/compiler/heptagon/transformations/every.ml b/compiler/heptagon/transformations/every.ml index 6f4aa71..6f03d95 100644 --- a/compiler/heptagon/transformations/every.ml +++ b/compiler/heptagon/transformations/every.ml @@ -82,10 +82,14 @@ and translate v acc_eq_list e = let re = { re with e_desc = Evar x } in v,acc_eq_list, { e with e_desc = Eiterator(it, op, n, e_list, Some re) } - | Eapp(op, e_list, None) -> + | Eapp(op, e_list, r) -> let v, acc_eq_list, e_list = translate_list v acc_eq_list e_list in v, acc_eq_list, - { e with e_desc = Eapp(op, e_list, None) } + { e with e_desc = Eapp(op, e_list, r) } + | Eiterator(it, op, n, e_list, r) -> + let v, acc_eq_list, e_list = translate_list v acc_eq_list e_list in + v, acc_eq_list, + { e with e_desc = Eiterator(it, op, n, e_list, r) } | Efield(e', field) -> let v, acc_eq_list, e' = translate v acc_eq_list e' in v,acc_eq_list, diff --git a/compiler/heptagon/transformations/last.ml b/compiler/heptagon/transformations/last.ml index 16b0b17..6056836 100644 --- a/compiler/heptagon/transformations/last.ml +++ b/compiler/heptagon/transformations/last.ml @@ -65,6 +65,9 @@ and translate env e = | Estruct(e_f_list) -> { e with e_desc = Estruct(List.map (fun (f, e) -> (f, translate env e)) e_f_list) } + | Eiterator(it, app, n, e_list, r) -> + { e with e_desc = Eiterator(it, app, n, + List.map (translate env) e_list, r) } let translate_contract env contract = match contract with