From 2757e7c1bfa2fa748a0095a7a6ed10d649ca5c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pasteur?= Date: Wed, 20 Apr 2011 16:23:27 +0200 Subject: [PATCH] Fixed normalized_mem It inverted the order of equations --- compiler/minils/transformations/normalize_mem.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/minils/transformations/normalize_mem.ml b/compiler/minils/transformations/normalize_mem.ml index be05fc2..bb83348 100644 --- a/compiler/minils/transformations/normalize_mem.ml +++ b/compiler/minils/transformations/normalize_mem.ml @@ -18,7 +18,7 @@ let eq _ (v, eqs) eq = match eq.eq_lhs, eq.eq_rhs.e_desc with let x_copy_exp = mk_exp ty (Eextvalue (mk_extvalue ~ty:ty (Wvar x_copy))) in let eq_copy = { eq with eq_rhs = x_copy_exp } in let eq = { eq with eq_lhs = Evarpat x_copy } in - eq, (vd::v, eq::eq_copy::eqs) + eq, (vd::v, eq_copy::eq::eqs) else eq, (v, eq::eqs) | _, _ -> @@ -26,7 +26,7 @@ let eq _ (v, eqs) eq = match eq.eq_lhs, eq.eq_rhs.e_desc with let node funs acc nd = let nd, (v, eqs) = Mls_mapfold.node_dec funs (nd.n_local, []) nd in - { nd with n_local = v; n_equs = eqs }, acc + { nd with n_local = v; n_equs = List.rev eqs }, acc let program p = let funs = { Mls_mapfold.defaults with eq = eq; node_dec = node } in