diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-16 15:54:50 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-11-16 15:54:50 +0000 |
commit | fa41fe05c58876a661c3d5f29baa0f39cab3e37f (patch) | |
tree | b4c1fb1f95943fce601bf485f874b7852bd8eaeb | |
parent | f837e859cac08532cd1d279af4aeb423933a1f07 (diff) | |
download | ATCD-fa41fe05c58876a661c3d5f29baa0f39cab3e37f.tar.gz |
ChangeLogTag: Tue Nov 16 09:45:26 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 30 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_traits.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp | 2 |
4 files changed, 39 insertions, 9 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 747a255b76f..89f6117e772 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,33 @@ +Tue Nov 16 09:45:26 2004 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_visitor_traits.cpp: + + Removed generation of Objref_Traits<> specialization + declaration for non-defined forward declared interfaces. + Since the interface is not defined, the specialization + class is not defined in the corresponding .cpp file, + which can lead to problems when interfaces are forward + declared across translation units or libraries. It was + thought previously that this declaration generation was + needed, but perhaps recent fixes to code generation for + non-defined forward declared interfaces has eliminated + the need. + + * TAO_IDL/be/be_visitor_exception/ctor_assign.cpp: + + Fixed generation of exception copy constructor and + assignment operator for exceptions to use Objref_Traits<> + for an interface member, in case it is forward declared and + not defined. + + * TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp: + + Changed the 'size' parameter passed to the typecode + constructor to always be 0. This parameter is not used + in the the TypeCode class constructor, and passing it + as 'sizeof()' causes problems when generating a typecode + for a typedef of a forward declared undefined interface. + Tue Nov 16 13:04:12 UTC 2004 Martin Corino <mcorino@remedy.nl> * tao/BoundsA.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp b/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp index 1aa107199bc..db0ec84fed0 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp @@ -156,13 +156,15 @@ be_visitor_exception_ctor_assign::visit_interface (be_interface *node) if (this->ctx_->exception ()) // Special constructor. { - *os << "this->" << bd->local_name () << " = " << node->name () - << "::_duplicate (_tao_" << bd->local_name () << ");"; + *os << "this->" << bd->local_name () << " = TAO::Objref_Traits<" + << node->name () << ">::duplicate (_tao_" + << bd->local_name () << ");"; } else { - *os << "this->" << bd->local_name () << " = " << node->name () - << "::_duplicate (_tao_excp." << bd->local_name () << ".in ());"; + *os << "this->" << bd->local_name () << " = TAO::Objref_Traits<" + << node->name () << ">::duplicate (_tao_excp." + << bd->local_name () << ".in ());"; } return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index 159e95ef9bd..189ad0d4f06 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -94,7 +94,7 @@ be_visitor_traits::visit_module (be_module *node) int be_visitor_traits::visit_interface (be_interface *node) { - if (node->cli_traits_gen ()) + if (node->cli_traits_gen () || !node->is_defined ()) { return 0; } @@ -103,10 +103,8 @@ be_visitor_traits::visit_interface (be_interface *node) // Since the three blocks below generate specialized (i.e., non-template) // classes, we don't want to generate them unless it's necessary - thus - // the logic surrounding each one. + // the ifdef logic surrounding each one. - // I think we need to generate this only for non-defined forward - // declarations. if (!node->imported ()) { os->gen_ifdef_macro (node->flat_name (), "traits"); 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 a08744b47ad..62125ca7e31 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -385,7 +385,7 @@ be_visitor_typecode_defn::visit_type (be_type *node) // Name generation. *os << "," << be_nl << "0," << be_nl - << "sizeof (" << node->name () << ")" << be_uidt_nl + << "0" << be_uidt_nl << ");" << be_uidt_nl << be_nl; // Is our enclosing scope a module? We need this check because for |