From fb547ea508d840ea653bae44d682c645dba3c15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Fri, 18 Jun 2010 13:21:42 +0200 Subject: [PATCH] Cosmetic clocking. --- minils/analysis/clocking.ml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/minils/analysis/clocking.ml b/minils/analysis/clocking.ml index 2505879..44943e1 100644 --- a/minils/analysis/clocking.ml +++ b/minils/analysis/clocking.ml @@ -121,8 +121,10 @@ let rec typing h e = | Evar x -> Ck (typ_of_name h x) | Efby (c, e) -> typing h e | Etuple e_list -> Cprod (List.map (typing h) e_list) - | Ecall(_, e_list, None) -> - let ck_r = new_var () + | Ecall(_, e_list, r) -> + let ck_r = match r with + | None -> new_var() + | Some(reset) -> typ_of_name h reset in (List.iter (expect h (Ck ck_r)) e_list; skeleton ck_r e.e_ty) | Ecall(_, e_list, Some(reset)) -> let ck_r = typ_of_name h reset @@ -172,8 +174,10 @@ and typing_array_op h e = function let ck = new_var () in let ct = skeleton ck e.e_ty in (expect h (Ck ck) e1; expect h ct e2; ct) - | Eiterator (_, f, _, _, e_list, _) -> - let ck_r = new_var () + | Eiterator (_, _, _, e_list, r) -> + let ck_r = match r with + | None -> new_var() + | Some(reset) -> typ_of_name h reset in (List.iter (expect h (Ck ck_r)) e_list; skeleton ck_r e.e_ty)