summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2011-11-28 15:43:09 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2011-11-28 15:43:09 +0000
commit815b8814d1184b40fd3838d9a780984b83285900 (patch)
treeb44fa002e91a23ae951f09e40cdc2a454b37f222
parentda57769d6b191990619abfe7a4ac04bd781478f3 (diff)
downloadATCD-815b8814d1184b40fd3838d9a780984b83285900.tar.gz
Mon Nov 28 15:41:10 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* TAO_IDL/be/be_interface.cpp: * TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp: * TAO_IDL/be_include/be_interface.h: Reduced amount of static methods generated for direct collocation. Next step is to move the direct collocation static methods into the regular skeleton, there is really no need for its own special class hierarchy * tests/Skeleton_Inheritance/skel_inheritance.mpc: Enable direct collocation
-rw-r--r--TAO/ChangeLog13
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp201
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp17
-rw-r--r--TAO/TAO_IDL/be_include/be_interface.h21
-rw-r--r--TAO/tests/Skeleton_Inheritance/skel_inheritance.mpc6
5 files changed, 16 insertions, 242 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 7d0abd4f9a8..23e70a7122e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,16 @@
+Mon Nov 28 15:41:10 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be/be_visitor_interface/direct_proxy_impl_sh.cpp:
+ * TAO_IDL/be_include/be_interface.h:
+ Reduced amount of static methods generated for direct collocation.
+ Next step is to move the direct collocation static methods into
+ the regular skeleton, there is really no need for its own
+ special class hierarchy
+
+ * tests/Skeleton_Inheritance/skel_inheritance.mpc:
+ Enable direct collocation
+
Mon Nov 28 14:29:45 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl>
* tao/ImR_Client/ImR_Client.cpp:
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index 90056690717..799dd96221d 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -1688,37 +1688,6 @@ be_interface::gen_optable_entries (be_interface *derived_interface,
}
void
-be_interface::gen_collocated_skel_body (be_interface *derived,
- be_interface *ancestor,
- AST_Decl *d,
- const char *prefix,
- bool /* direct */,
- UTL_ExceptList *,
- TAO_OutStream *os)
-{
- *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- // Generate the static method corresponding to this method.
- *os << be_nl_2
- << "ACE_INLINE void" << be_nl
- << derived->full_direct_proxy_impl_name ()
- << "::" << prefix << d->local_name () << " ("
- << be_idt_nl
- << "TAO_Abstract_ServantBase *servant," << be_nl
- << "TAO::Argument ** args)" << be_uidt_nl;
-
- *os << "{" << be_idt_nl
- << ancestor->full_direct_proxy_impl_name ()
- << "::" << prefix << d->local_name () << " ("
- << be_idt_nl
- << "servant," << be_nl
- << "args);" << be_uidt
- << be_uidt_nl
- << "}"<< be_nl;
-}
-
-void
be_interface::gen_ostream_operator (TAO_OutStream *os,
bool /* use_underscore */)
{
@@ -2354,176 +2323,6 @@ be_interface::is_a_helper (be_interface * /*derived*/,
}
int
-be_interface::gen_colloc_op_decl_helper (be_interface *derived,
- be_interface *ancestor,
- TAO_OutStream *os)
-{
- // If derived and ancestor are same, skip it.
- if (derived == ancestor)
- {
- return 0;
- }
-
- // If an operation or an attribute is abstract (declared in an
- // abstract interface), we will either generate the full
- // definition (if there are no concrete interfaces between the
- // abstract ancestor and us) or, if there is a concrete ancestor
- // in between, we will catch its definition elsewhere in this
- // traversal.
- if (ancestor->is_abstract () || ancestor->nmembers () == 0)
- {
- return 0;
- }
-
- for (UTL_ScopeActiveIterator si (ancestor, UTL_Scope::IK_decls);
- !si.is_done ();
- si.next ())
- {
- // Get the next AST decl node
- AST_Decl *d = si.item ();
-
- if (d->node_type () == AST_Decl::NT_op)
- {
- *os << be_nl_2 << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__ << be_nl_2;
-
- // Generate the static method corresponding to this method.
- *os << "static void" << be_nl
- << d->local_name () << " (" << be_idt_nl
- << "TAO_Abstract_ServantBase *servant, "
- << "TAO::Argument **args);" << be_uidt_nl;
- }
- else if (d->node_type () == AST_Decl::NT_attr)
- {
- AST_Attribute *attr = AST_Attribute::narrow_from_decl (d);
-
- if (attr == 0)
- {
- return -1;
- }
-
- // Generate the static method corresponding to this method.
- *os << "static void" << be_nl
- << "_get_" << d->local_name () << " (" << be_idt_nl
- << "TAO_Abstract_ServantBase *servant, "
- << "TAO::Argument **args);" << be_uidt_nl;
-
- if (!attr->readonly ())
- {
- *os << be_nl_2;
-
- // Generate the static method corresponding to
- // this method.
- *os << "static void" << be_nl
- << "_set_" << d->local_name () << " ("
- << be_idt_nl
- << "TAO_Abstract_ServantBase *servant, "
- << "TAO::Argument **args);" << be_uidt_nl;
- }
- }
- }
-
- return 0;
-}
-
-int
-be_interface::gen_colloc_op_defn_helper (be_interface *derived,
- be_interface *ancestor,
- TAO_OutStream *os)
-{
- // If derived and ancestor are same, skip it.
- if (derived == ancestor)
- {
- return 0;
- }
-
- // If an operation or an attribute is abstract (declared in an
- // abstract interface), we will either generate the full
- // definition (if there are no concrete interfaces between the
- // abstract ancestor and us) or, if there is a concrete ancestor
- // in between, we will catch its definition elsewhere in this
- // traversal.
- if (ancestor->is_abstract () || ancestor->nmembers () == 0)
- {
- return 0;
- }
-
- AST_Decl *d = 0;
- be_operation *op = 0;
-
- for (UTL_ScopeActiveIterator si (ancestor, UTL_Scope::IK_decls);
- !si.is_done ();
- si.next ())
- {
- // Get the next AST decl node
- d = si.item ();
- AST_Decl::NodeType nt = d->node_type ();
-
- if (nt == AST_Decl::NT_op)
- {
- op = be_operation::narrow_from_decl (d);
-
- /// Skip these on the skeleton side.
- if (op->is_sendc_ami ())
- {
- continue;
- }
-
- if (be_global->gen_direct_collocation ())
- {
- be_interface::gen_collocated_skel_body (derived,
- ancestor,
- d,
- "",
- true,
- op->exceptions (),
- os);
- }
- }
- else if (nt == AST_Decl::NT_attr)
- {
- AST_Attribute *attr = AST_Attribute::narrow_from_decl (d);
-
- if (attr == 0)
- {
- return -1;
- }
-
- if (be_global->gen_direct_collocation ())
- {
- be_interface::gen_collocated_skel_body (
- derived,
- ancestor,
- d,
- "_get_",
- true,
- attr->get_get_exceptions (),
- os
- );
- }
-
- if (!attr->readonly ())
- {
- if (be_global->gen_direct_collocation ())
- {
- be_interface::gen_collocated_skel_body (
- derived,
- ancestor,
- d,
- "_set_",
- true,
- attr->get_set_exceptions (),
- os
- );
- }
- }
- }
- }
-
- return 0;
-}
-
-int
be_interface::copy_ctor_helper (be_interface *derived,
be_interface *base,
TAO_OutStream *os)
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 6426205be58..4766f0afb9a 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
@@ -91,23 +91,6 @@ be_visitor_interface_direct_proxy_impl_sh::visit_interface (
-1);
}
- // Generate static collocated operations for operations of our base
- // classes.
- int status =
- node->traverse_inheritance_graph (
- be_interface::gen_colloc_op_decl_helper,
- os
- );
-
- if (status == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "be_visitor_interface_direct_proxy_impl_sh::"
- "visit_interface - "
- "inheritance graph traversal failed\n"),
- -1);
- }
-
*os << be_uidt_nl
<< "};" << be_nl_2
<< "//" << be_nl
diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h
index a55c797cecf..46e95ec8235 100644
--- a/TAO/TAO_IDL/be_include/be_interface.h
+++ b/TAO/TAO_IDL/be_include/be_interface.h
@@ -185,18 +185,6 @@ public:
be_interface *,
TAO_OutStream *os);
- /// Helper method passed to the template method to generate code for the
- /// collocated functions in the header file.
- static int gen_colloc_op_decl_helper (be_interface *derived,
- be_interface *ancestor,
- TAO_OutStream *os);
-
- /// Helper method passed to the template method to generate code for the
- /// collocated functions in the source file.
- static int gen_colloc_op_defn_helper (be_interface *derived,
- be_interface *ancestor,
- TAO_OutStream *os);
-
/// Helper method passed to the template method to invoke ctors of all the
/// base classes.
static int copy_ctor_helper (be_interface *,
@@ -241,15 +229,6 @@ public:
/// pure virtual.
int convert_parent_ops (be_visitor *visitor);
- /// Common code called from gen_colloc_op_defn_helper().
- static void gen_collocated_skel_body (be_interface *derived,
- be_interface *ancestor,
- AST_Decl *d,
- const char *prefix,
- bool direct,
- UTL_ExceptList *list,
- TAO_OutStream *os);
-
/// Overridden from class be_type.
virtual void gen_ostream_operator (TAO_OutStream *os,
bool use_underscore);
diff --git a/TAO/tests/Skeleton_Inheritance/skel_inheritance.mpc b/TAO/tests/Skeleton_Inheritance/skel_inheritance.mpc
index c78bc595f7b..60c5c9d29a0 100644
--- a/TAO/tests/Skeleton_Inheritance/skel_inheritance.mpc
+++ b/TAO/tests/Skeleton_Inheritance/skel_inheritance.mpc
@@ -8,7 +8,7 @@ project(idl_one_gen): taoidldefaults {
-Wb,stub_export_include=skeleton_inheritance_stub_1_export.h \
-Wb,skel_export_macro=SKELETON_INHERITANCE_SKEL_1_Export \
-Wb,skel_export_include=skeleton_inheritance_skel_1_export.h \
- -Gxhst -Gxhsk
+ -Gxhst -Gxhsk -Gd
IDL_Files {
idl_1.idl
@@ -22,7 +22,7 @@ project(idl_two_gen): taoidldefaults {
-Wb,stub_export_include=skeleton_inheritance_stub_2_export.h \
-Wb,skel_export_macro=SKELETON_INHERITANCE_SKEL_2_Export \
-Wb,skel_export_include=skeleton_inheritance_skel_2_export.h \
- -Gxhst -Gxhsk
+ -Gxhst -Gxhsk -Gd
IDL_Files {
idl_2.idl
@@ -36,7 +36,7 @@ project(idl_three_gen): taoidldefaults {
-Wb,stub_export_include=skeleton_inheritance_stub_3_export.h \
-Wb,skel_export_macro=SKELETON_INHERITANCE_SKEL_3_Export \
-Wb,skel_export_include=skeleton_inheritance_skel_3_export.h \
- -Gxhst -Gxhsk
+ -Gxhst -Gxhsk -Gd
IDL_Files {
idl_3.idl