From d7739c33ec2ff0bfae75f3efe3985dcffc8d1875 Mon Sep 17 00:00:00 2001 From: Erwan Jahier <jahier@imag.fr> Date: Tue, 3 Feb 2009 16:08:59 +0100 Subject: [PATCH] Fix a bug in the handling of alias node, that was triggered is use in conjunction of some program transformation (-ei or -esa). In Lazycompiler.node_check_do, I've forgotten to put the node i/o in the local_env table in the case of node alias. --- src/inline.ml | 2 +- src/lazyCompiler.ml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/inline.ml b/src/inline.ml index 887d19da..531bddaf 100644 --- a/src/inline.ml +++ b/src/inline.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 03/02/2009 (at 16:04) by Erwan Jahier> *) +(** Time-stamp: <modified the 03/02/2009 (at 16:08) by Erwan Jahier> *) open Lxm diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml index d3577507..ecbfc6cd 100644 --- a/src/lazyCompiler.ml +++ b/src/lazyCompiler.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 03/02/2009 (at 16:05) by Erwan Jahier> *) +(** Time-stamp: <modified the 03/02/2009 (at 16:08) by Erwan Jahier> *) open Lxm @@ -774,6 +774,17 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t -> in let (alias_node : Eff.node_exp) = make_alias_node aliased_node in + (* update the local_env table *) + let _ = + let update_local_env_table vi = + Hashtbl.add local_env.lenv_vars vi.var_name_eff vi + in + List.iter update_local_env_table alias_node.inlist_eff; + List.iter update_local_env_table alias_node.outlist_eff; + match alias_node.loclist_eff with + None -> () | Some l -> List.iter update_local_env_table l; + in + (* Check that the declared profile (if any) matches with the alias *) match node_def.it.vars with | None -> alias_node -- GitLab