diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-17 21:01:34 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-08-17 21:01:34 +0000 |
commit | eafe71f31e6f68ca93973266bf6b4db09f5097ec (patch) | |
tree | a5fff83cc0c5a06e68f6139e8793b9d2f242032c | |
parent | 6e1775361a167c9336666f616775218e2e1c0896 (diff) | |
download | ATCD-eafe71f31e6f68ca93973266bf6b4db09f5097ec.tar.gz |
ChangeLogTag: Tue Aug 17 15:48:28 2004 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 39 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_interface.cpp | 5 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_valuetype.cpp | 24 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interceptors_ss.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface.cpp | 5 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp | 31 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_valuetype.h | 6 |
15 files changed, 68 insertions, 78 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 46bcdc20673..ab15ed8cad7 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,42 @@ +Tue Aug 17 15:48:28 2004 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_interface.cpp: + + Changed the logic of the check for 'mixed parentage' + (abstract & concrete) in an interface, to return true not + only if an interface has an immediate abstract parent (as + before) but also if there is an abstract interface + anywhere in its ancestry. This is necessary for skeletons-side + code generation, since abstract interfaces have no operations + generated on the skeleton side for children to inherit, the + operations must be regenerated in each child. + + * TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp: + * TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp: + * TAO_IDL/be/be_visitor_interface/interceptors_ss.cpp: + * TAO_IDL/be/be_visitor_interface/interface.cpp: + * TAO_IDL/be/be_visitor_interface/interface_ch.cpp: + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: + * TAO_IDL/be/be_visitor_interface/interface_sh.cpp: + * TAO_IDL/be/be_visitor_interface/interface_ss.cpp: + * TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp: + * TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp: + + For the gen_abstract_ops_helper() static method in each of the + above visitors, changed the logic to do nothing unless the + base interface passed to the method is abstract. The check + has been moved here from its former location in the method + call so operations inherited from distance abstract ancestors + can be found and regenerated. Thanks to Markus Stenberg + <markus.stenberg@conformiq.com> for sending in an example that + uncovered the bug. + + * TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp: + * TAO_IDL/be/be_valuetype.cpp: + * TAO_IDL/be_include/be_valuetype.h: + + Removed unused code. + Tue Aug 17 11:40:05 2004 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_visitor_root/root.cpp: diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 1fc3434c684..00179b1f715 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -1360,7 +1360,10 @@ be_interface::analyze_parentage (void) for (long i = 0; i < this->pd_n_inherits; ++i) { - if (this->pd_inherits[i]->is_abstract ()) + be_interface *parent = + be_interface::narrow_from_decl (this->pd_inherits[i]); + + if (parent->is_abstract () || parent->has_mixed_parentage ()) { this->has_mixed_parentage_ = 1; break; diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp index 844bd5704ee..60445e0aebc 100644 --- a/TAO/TAO_IDL/be/be_valuetype.cpp +++ b/TAO/TAO_IDL/be/be_valuetype.cpp @@ -755,7 +755,7 @@ be_valuetype::traverse_supports_list_graphs ( { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_valuetype::" - "traverse_supports_graph_list - " + "traverse_supports_list_graphs - " "error generating entries\n"), -1); } @@ -809,29 +809,7 @@ be_valuetype::abstract_supports_helper (be_interface *, *os << "," << be_nl << "public virtual " << base->name (); -/* - if (base->is_nested ()) - { - UTL_Scope *parent_scope = base->defined_in (); - AST_Decl *parent_decl = ScopeAsDecl (parent_scope); - - *os << "ACE_NESTED_CLASS (" - << parent_decl->name () << ", " - << base->local_name () << ")"; - } - else - { - *os << base->local_name (); - } -*/ - return 0; -} -int -be_valuetype::gen_abstract_init_helper (be_interface *, - be_interface *, - TAO_OutStream *) -{ return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp index 85503801aad..b6863cc1822 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp @@ -129,7 +129,7 @@ be_visitor_interface_direct_proxy_impl_sh::gen_abstract_ops_helper ( TAO_OutStream *os ) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -149,7 +149,7 @@ be_visitor_interface_direct_proxy_impl_sh::gen_abstract_ops_helper ( { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_thru_poa_proxy_" - "impl_sh::abstract_base_ops_helper - " + "impl_sh::gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp index 1986eae1270..be617ef34ce 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_ss.cpp @@ -63,7 +63,7 @@ be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper ( TAO_OutStream *os ) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -83,7 +83,7 @@ be_visitor_interface_direct_proxy_impl_ss::gen_abstract_ops_helper ( { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_direct_proxy" - "_impl_ss::abstract_base_ops_helper - " + "_impl_ss::gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interceptors_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interceptors_ss.cpp index 3ffceb381fc..a040a8a5e89 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interceptors_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interceptors_ss.cpp @@ -90,7 +90,7 @@ be_visitor_interface_interceptors_ss::gen_abstract_ops_helper ( TAO_OutStream *os ) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -110,7 +110,7 @@ be_visitor_interface_interceptors_ss::gen_abstract_ops_helper ( { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_interceptors_ss::" - "abstract_base_ops_helper - " + "gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp index c9ae586fb1d..b02cd9a48e1 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp @@ -116,10 +116,13 @@ be_visitor_interface::visit_scope (be_scope *node) return 0; } + // 'abstract_paths_only' arg is FALSE here because we want to traverse + // through concrete parents to get to all the abstract ones. The helper + // will do nothing unless the base interface passed to it is abstract. int status = intf->traverse_inheritance_graph (helper, this->ctx_->stream (), - I_TRUE); + I_FALSE); if (status == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index a0e3ce9f913..1e7b0fefcf9 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -379,7 +379,7 @@ be_visitor_interface_ch::gen_abstract_ops_helper (be_interface *node, be_interface *base, TAO_OutStream *os) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -398,7 +398,7 @@ be_visitor_interface_ch::gen_abstract_ops_helper (be_interface *node, { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_interface::" - "abstract_base_ops_helper - " + "gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index dbed26ff19a..4366e194bb7 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -562,7 +562,7 @@ be_visitor_interface_cs::gen_abstract_ops_helper (be_interface *node, be_interface *base, TAO_OutStream *os) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -581,7 +581,7 @@ be_visitor_interface_cs::gen_abstract_ops_helper (be_interface *node, { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_cs::" - "abstract_base_ops_helper - " + "gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index d413ed775a3..e8d950f4d1f 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -327,7 +327,7 @@ be_visitor_interface_sh::gen_abstract_ops_helper ( TAO_OutStream *os ) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -347,7 +347,7 @@ be_visitor_interface_sh::gen_abstract_ops_helper ( { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_sh::" - "abstract_base_ops_helper - " + "gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index aca20597312..4945b3676f5 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -443,7 +443,7 @@ be_visitor_interface_ss::gen_abstract_ops_helper (be_interface *node, be_interface *base, TAO_OutStream *os) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -463,7 +463,7 @@ be_visitor_interface_ss::gen_abstract_ops_helper (be_interface *node, { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_ss::" - "abstract_base_ops_helper - " + "gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp index 18ac8f0907a..2224b0189af 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp @@ -133,7 +133,7 @@ be_visitor_interface_thru_poa_proxy_impl_sh::gen_abstract_ops_helper ( TAO_OutStream *os ) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -153,7 +153,7 @@ be_visitor_interface_thru_poa_proxy_impl_sh::gen_abstract_ops_helper ( { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_thru_poa_proxy_" - "impl_sh::abstract_base_ops_helper - " + "impl_sh::gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp index 255e4b12a32..a37f93b2d50 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_ss.cpp @@ -70,7 +70,7 @@ be_visitor_interface_thru_poa_proxy_impl_ss::gen_abstract_ops_helper ( TAO_OutStream *os ) { - if (node == base) + if (!base->is_abstract ()) { return 0; } @@ -90,7 +90,7 @@ be_visitor_interface_thru_poa_proxy_impl_ss::gen_abstract_ops_helper ( { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_thru_poa_proxy" - "_impl_ss::abstract_base_ops_helper - " + "_impl_ss::gen_abstract_ops_helper - " "bad node in this scope\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp index 3b86f08e4b1..2ee88358c20 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp @@ -56,35 +56,8 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; *os << "ACE_INLINE" << be_nl; - *os << node->name () << "::" << node->local_name () << " (void)" << be_nl; - - if (node->supports_abstract ()) - { - *os << "{" << be_idt; - - int status = - node->traverse_supports_list_graphs ( - be_valuetype::gen_abstract_init_helper, - os, - I_TRUE, - I_FALSE - ); - - if (status == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_valuetype_ci::" - "visit_valuetype - " - "traversal of supported interfaces failed\n"), - -1); - } - - *os << be_uidt_nl << "}" << be_nl << be_nl; - } - else - { - *os << "{}" << be_nl << be_nl; - } + *os << node->name () << "::" << node->local_name () << " (void)" << be_nl + << "{}" << be_nl << be_nl; *os << "ACE_INLINE" << be_nl; *os << node->name () << "::~" << node->local_name () << " (void)" << be_nl; diff --git a/TAO/TAO_IDL/be_include/be_valuetype.h b/TAO/TAO_IDL/be_include/be_valuetype.h index 37c9c2df060..b3c81fa052f 100644 --- a/TAO/TAO_IDL/be_include/be_valuetype.h +++ b/TAO/TAO_IDL/be_include/be_valuetype.h @@ -134,12 +134,6 @@ public: // Helper method passed to the template method to generate code for // adding abstract supported interfaces to the inheritance list. - static int gen_abstract_init_helper (be_interface *node, - be_interface *base, - TAO_OutStream *os); - // Helper method to initialize the val_ member of the generated - // C++ class for each abstract interface that we support. - static int gen_skel_helper (be_interface *node, be_interface *base, TAO_OutStream *os); |