summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-05-08 07:23:38 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-05-08 07:23:38 +0000
commitcf35b1f2a022ff46334de8dd7c549a88bf3d264b (patch)
tree496146ddeeacc0899c4131a6aa7455af7c3791bd
parenta9d8d37b16a781292b18d43793fada43585c5629 (diff)
downloadATCD-cf35b1f2a022ff46334de8dd7c549a88bf3d264b.tar.gz
ChangeLogTag:Sun May 8 00:20:50 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp13
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp2
6 files changed, 24 insertions, 9 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 13cbfa2e1f2..e02058b800e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,13 @@
+Sun May 8 00:20:50 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp (visit_array):
+ (visit_sequence):
+
+ Only generate a TypeCode for the base/content type if the latter
+ is not defined. Addresses duplicate definitions in the case of
+ structure containing arrays of structures (not necessarily
+ recursive).
+
Sat May 7 20:12:12 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
* TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp
index 4f6f57a8814..d3f9f1f322c 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/alias_typecode.cpp
@@ -33,8 +33,8 @@ TAO::be_visitor_alias_typecode::visit_typedef (be_typedef * node)
this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED);
// Generate typecode for the base type, being careful to avoid doing
- // so a for a typedef since that could recursively cause multiple
- // base type TypeCode definitions to be generated.
+ // so for a typedef since that could recursively cause multiple base
+ // type TypeCode definitions to be generated.
if (!base || (base->node_type () != AST_Decl::NT_typedef
&& base->accept (this) == -1))
{
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
index 608fcf86091..80ec1b2d8e3 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
@@ -42,7 +42,7 @@ TAO::be_visitor_struct_typecode::visit_structure (be_structure * node)
else if (this->queue_insert (this->tc_queue_, node, 0) == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typecode_defn::"
+ "(%N:%l) be_visitor_struct_typecode::"
"visit_type - "
"queue insert failed\n"),
-1);
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
index 5b6635d7138..46a438ddd2e 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp
@@ -626,9 +626,10 @@ be_visitor_typecode_defn::visit_array (be_array *node)
this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED);
// Generate typecode for the base type, being careful to avoid doing
- // so a for a typedef since that could recursively cause multiple
- // base type TypeCode definitions to be generated.
+ // so for a typedef since that could recursively cause multiple base
+ // type TypeCode definitions to be generated.
if (!base || (base->node_type () != AST_Decl::NT_typedef
+ && !base->is_defined ()
&& base->accept (this) == -1))
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -638,6 +639,9 @@ be_visitor_typecode_defn::visit_array (be_array *node)
-1);
}
+ if (this->recursion_detect_)
+ return 0; // Nothing else to do.
+
// Multiple definition guards.
// @todo Can we automate duplicate detection within the IDL compiler
// itself?
@@ -937,9 +941,10 @@ be_visitor_typecode_defn::visit_sequence (be_sequence * node)
this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED);
// Generate typecode for the base type, being careful to avoid doing
- // so a for a typedef since that could recursively cause multiple
- // base type TypeCode definitions to be generated.
+ // so for a typedef since that could recursively cause multiple base
+ // type TypeCode definitions to be generated.
if (!base || (base->node_type () != AST_Decl::NT_typedef
+ && !base->is_defined ()
&& base->accept (this) == -1))
{
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp
index 9ab3351a5ff..37e04977d68 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/union_typecode.cpp
@@ -39,7 +39,7 @@ TAO::be_visitor_union_typecode::visit_union (be_union * node)
else if (this->queue_insert (this->tc_queue_, node, 0) == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typecode_defn::"
+ "(%N:%l) be_visitor_union_typecode::"
"visit_type - "
"queue insert failed\n"),
-1);
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp
index 6f90c834f1e..ac16564d9e9 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/value_typecode.cpp
@@ -42,7 +42,7 @@ TAO::be_visitor_value_typecode::visit_valuetype (be_valuetype * node)
else if (this->queue_insert (this->tc_queue_, node, 0) == 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_typecode_defn::"
+ "(%N:%l) be_visitor_value_typecode::"
"visit_type - "
"queue insert failed\n"),
-1);