summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-11-30 20:53:01 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-11-30 20:53:01 +0000
commit7132d66c201d5b83a440d420f8dd0cd2a24536fd (patch)
tree729d6e6d0bb5c16b3549b3c5655f4bec4fc07f08
parente536d42709fa908e9fde4f2b6ffcb8df0f888fab (diff)
downloadATCD-7132d66c201d5b83a440d420f8dd0cd2a24536fd.tar.gz
ChangeLogTag: Tue Nov 30 20:48:06 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog13
-rw-r--r--TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp3
-rw-r--r--TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp4
3 files changed, 18 insertions, 2 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 356d5437257..8345338ea4e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,16 @@
+Tue Nov 30 20:48:06 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp:
+ * TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp:
+
+ When updating the global list of current template
+ module parameter references (associated with an
+ 'alias' IDL construct), added a holder for the old
+ list, which then is restored (instead of setting
+ the list to 0) after the current scope is traversed.
+ This change was necessary to handle the case when
+ aliased template modules are nested.
+
Tue Nov 30 18:15:54 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_visitor_component/component_ami_rh_exh.cpp:
diff --git a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp
index f5b7c4fdf29..a1831f2efd0 100644
--- a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp
+++ b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp
@@ -693,6 +693,7 @@ ast_visitor_tmpl_module_inst::visit_module (AST_Module *node)
idl_global->scopes ().push (added_module);
AST_Template_Module_Ref *ref = node->from_ref ();
+ UTL_StrList const *old_refs = idl_global->alias_params ();
if (ref != 0)
{
@@ -712,7 +713,7 @@ ast_visitor_tmpl_module_inst::visit_module (AST_Module *node)
// Restore scope stack.
idl_global->scopes ().pop ();
- idl_global->alias_params (0);
+ idl_global->alias_params (const_cast<UTL_StrList *> (old_refs));
return 0;
}
diff --git a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp
index 2ff6d0c4d5c..9302701cc6f 100644
--- a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp
+++ b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp
@@ -76,6 +76,8 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref (
const_cast<FE_Utils::T_PARAMLIST_INFO *> (
idl_global->current_params ());
+ UTL_StrList const *old_refs = idl_global->alias_params ();
+
idl_global->alias_params (
const_cast<UTL_StrList *> (node->param_refs ()));
AST_Template_Module *tm = node->ref ();
@@ -95,7 +97,7 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref (
/// Restore the global param list state.
idl_global->current_params (holder);
- idl_global->alias_params (0);
+ idl_global->alias_params (const_cast<UTL_StrList *> (old_refs));
idl_global->scopes ().pop ();