summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-12-07 20:10:22 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-12-07 20:10:22 +0000
commit4b907c0788d7ae7266cd87c9224536840dfe1cb1 (patch)
tree569578713c081eeac7f7d491ae7e5e191b538cf8
parent0128f12452961a6996c1d86c802c93bbc2462fa0 (diff)
downloadATCD-4b907c0788d7ae7266cd87c9224536840dfe1cb1.tar.gz
ChangeLogTag: Tue Dec 7 20:07:32 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/TAO_IDL/ast/ast_visitor_reifying.cpp2
-rw-r--r--TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp18
-rw-r--r--TAO/TAO_IDL/include/idl_global.h16
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp14
-rw-r--r--TAO/TAO_IDL/util/utl_scope.cpp9
6 files changed, 62 insertions, 8 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 9fc2df86801..05981f79315 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Tue Dec 7 20:07:32 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/include/idl_global.h:
+ * TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp:
+ * TAO_IDL/ast/ast_visitor_reifying.cpp:
+ * TAO_IDL/util/utl_global.cpp:
+ * TAO_IDL/util/utl_scope.cpp:
+
+ Fixed bug in code generation of DDS4CCM DataWriter
+ and DataReader classes.
+
Fri Dec 3 21:34:48 UTC 2010 Adam Mitz <mitza@ociweb.com>
* utils/logWalker/Invocation.cpp:
diff --git a/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp b/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp
index b646eec0122..b99f4a47e5d 100644
--- a/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp
+++ b/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp
@@ -598,7 +598,7 @@ ast_visitor_reifying::visit_param_holder (AST_Param_Holder *node)
ACE_TEXT ("ast_visitor_reifying::")
ACE_TEXT ("visit_param_holder() - no match for ")
ACE_TEXT ("template param %C in %C\n"),
- node->info ()->name_.c_str (),
+ node->local_name ()->get_string (),
ScopeAsDecl (idl_global->scopes ().top ())->full_name ()),
-1);
}
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 9302701cc6f..1a05135ffc4 100644
--- a/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp
+++ b/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_ref.cpp
@@ -33,7 +33,7 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref (
AST_Template_Module_Ref *node)
{
/// This traversal should be done only once. If the template
- /// module this ref is contain in is itself aliased later,
+ /// module this ref is contained in is itself aliased later,
/// we don't want to execute the steps below again.
if (node->processed ())
{
@@ -72,11 +72,16 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref (
/// that's what will be search for any matches. We save the
/// current list to restore after the traversal.
- FE_Utils::T_PARAMLIST_INFO *holder =
- const_cast<FE_Utils::T_PARAMLIST_INFO *> (
- idl_global->current_params ());
+ if (idl_global->for_new_holder () == 0)
+ {
+ idl_global->for_new_holder (
+ const_cast<UTL_StrList *> (
+ node->param_refs ()));
+ }
UTL_StrList const *old_refs = idl_global->alias_params ();
+ FE_Utils::T_PARAMLIST_INFO const *old_params =
+ idl_global->current_params ();
idl_global->alias_params (
const_cast<UTL_StrList *> (node->param_refs ()));
@@ -96,7 +101,10 @@ ast_visitor_tmpl_module_ref::visit_template_module_ref (
}
/// Restore the global param list state.
- idl_global->current_params (holder);
+ idl_global->current_params (
+ const_cast<FE_Utils::T_PARAMLIST_INFO *> (
+ old_params));
+ idl_global->for_new_holder (0);
idl_global->alias_params (const_cast<UTL_StrList *> (old_refs));
idl_global->scopes ().pop ();
diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h
index 4e4195c7204..41131a365f2 100644
--- a/TAO/TAO_IDL/include/idl_global.h
+++ b/TAO/TAO_IDL/include/idl_global.h
@@ -692,6 +692,13 @@ public:
// template module, but create param holders with the
// alias names.
+ UTL_StrList const *for_new_holder (void) const;
+ void for_new_holder (UTL_StrList *params);
+ // Accessors for the member. If a lookup matches something
+ // from current_params(), the actual created param holder must
+ // match the corresponding element on this list, if it is
+ // non-zero.
+
#if defined (ACE_OPENVMS)
static char* translateName (const char* name, char *name_buf);
#endif
@@ -854,7 +861,8 @@ private:
FE_Utils::T_PARAMLIST_INFO *current_params_;
// Stored if we are parsing the scope of a template module,
- // 0 otherwise.
+ // 0 otherwise. Contains the params of the referenced
+ // template module if we are traversing an alias.
UTL_StrList *alias_params_;
// Stored if we are parsing a template module reference. The
@@ -862,6 +870,12 @@ private:
// module, but the param holder(s) created will use the
// aliased names.
+ UTL_StrList *for_new_holder_;
+ // Stored if we are traversing an alias, this is a list of
+ // the enclosing template module's params. When we create
+ // a param holder, it will need this name rather than the
+ // name of the alias's referenced param.
+
ACE_Unbounded_Queue<char *> ciao_lem_file_names_;
// Files parsed with ciao lem pragma
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp
index 3cba12708e1..dd6611b9681 100644
--- a/TAO/TAO_IDL/util/utl_global.cpp
+++ b/TAO/TAO_IDL/util/utl_global.cpp
@@ -151,6 +151,7 @@ IDL_GlobalData::IDL_GlobalData (void)
big_file_name_ ("PICML_IDL_file_bag"),
current_params_ (0),
alias_params_ (0),
+ for_new_holder_ (0),
included_ami_receps_done_ (false),
corba_module_ (0),
anon_type_diagnostic_ (ANON_TYPE_ERROR),
@@ -1638,6 +1639,19 @@ UTL_StrList *params)
this->alias_params_ = params;
}
+UTL_StrList const *
+IDL_GlobalData::for_new_holder (void) const
+{
+ return this->for_new_holder_;
+}
+
+void
+IDL_GlobalData::for_new_holder (
+ UTL_StrList *params)
+{
+ this->for_new_holder_ = params;
+}
+
void
IDL_GlobalData::add_dcps_data_type (const char* id)
{
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp
index abc9572f812..34671122a9c 100644
--- a/TAO/TAO_IDL/util/utl_scope.cpp
+++ b/TAO/TAO_IDL/util/utl_scope.cpp
@@ -1886,7 +1886,14 @@ UTL_Scope::match_param (UTL_ScopedName *e)
unsigned long index = 0;
UTL_StrList *alias_params =
- const_cast<UTL_StrList *> (idl_global->alias_params ());
+ const_cast<UTL_StrList *> (idl_global->for_new_holder ());
+
+ if (alias_params == 0)
+ {
+ alias_params =
+ const_cast<UTL_StrList *> (idl_global->alias_params ());
+ }
+
UTL_String *alias_param = 0;
for (FE_Utils::T_PARAMLIST_INFO::CONST_ITERATOR i (*params);