summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-18 16:45:10 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-18 16:45:10 +0000
commit2a83821735afebbc847b95901c42873609c80834 (patch)
treebfdbf09342155c1eca575d4c205b82c93d2dfcd1
parent63fd3f5fb921dedc57c61e1ac7d0a4999c03ff55 (diff)
downloadATCD-2a83821735afebbc847b95901c42873609c80834.tar.gz
Native exception support fixes
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/collocated_ss.cpp58
2 files changed, 35 insertions, 25 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp
index 4a24d8a40ab..91ec2bd8705 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/collocated_ss.cpp
@@ -113,6 +113,7 @@ int be_visitor_interface_collocated_ss::visit_interface (be_interface *node)
<< "if (this->_stubobj ()->orb_core ()->get_collocation_strategy ()"
" == TAO_ORB_Core::THRU_POA)" << be_idt_nl
<< "{" << be_idt_nl;
+
*os <<"TAO_Object_Adapter::Servant_Upcall servant_upcall ("
<< be_idt << be_idt_nl
<< "*this->_stubobj ()->"
@@ -157,6 +158,7 @@ int be_visitor_interface_collocated_ss::visit_interface (be_interface *node)
<< "if (this->_stubobj ()->orb_core ()->get_collocation_strategy ()"
" == TAO_ORB_Core::THRU_POA)" << be_idt_nl
<< "{" << be_idt_nl;
+
*os <<"TAO_Object_Adapter::Servant_Upcall servant_upcall ("
<< be_idt << be_idt_nl
<< "*this->_stubobj ()->"
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/collocated_ss.cpp
index dab745b3316..39fcb55c7f2 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/collocated_ss.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/collocated_ss.cpp
@@ -136,40 +136,44 @@ int be_visitor_operation_collocated_ss::visit_operation (be_operation *node)
" == TAO_ORB_Core::THRU_POA)" << be_idt_nl
<< "{\n" << be_idt;
- // Declare a return type
- ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS);
- visitor = tao_cg->make_visitor (&ctx);
- if (!visitor || (bt->accept (visitor) == -1))
- {
- delete visitor;
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_collocated_ss::"
- "visit_operation - "
- "codegen for return var decl failed\n"),
- -1);
- }
-
- if (!this->void_return_type (bt))
+ if (!idl_global->exception_support ())
{
- os->indent ();
- *os << "ACE_UNUSED_ARG (";
+ // Declare a return type
ctx = *this->ctx_;
- ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
+ ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_DECL_CS);
visitor = tao_cg->make_visitor (&ctx);
if (!visitor || (bt->accept (visitor) == -1))
{
delete visitor;
ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_operation_collocated_cs::"
- "gen_check_exception - "
- "codegen failed\n"),
+ "(%N:%l) be_visitor_operation_collocated_ss::"
+ "visit_operation - "
+ "codegen for return var decl failed\n"),
-1);
}
- *os << ");\n";
+
+ if (!this->void_return_type (bt))
+ {
+ os->indent ();
+ *os << "ACE_UNUSED_ARG (";
+ ctx = *this->ctx_;
+ ctx.state (TAO_CodeGen::TAO_OPERATION_RETVAL_RETURN_CS);
+ visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor || (bt->accept (visitor) == -1))
+ {
+ delete visitor;
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_operation_collocated_cs::"
+ "gen_check_exception - "
+ "codegen failed\n"),
+ -1);
+ }
+ *os << ");\n";
+ }
}
os->indent ();
+
*os <<"TAO_Object_Adapter::Servant_Upcall servant_upcall ("
<< be_idt << be_idt_nl
<< "*this->_stubobj ()->servant_orb_var ()->orb_core ()->object_adapter ()"
@@ -177,9 +181,13 @@ int be_visitor_operation_collocated_ss::visit_operation (be_operation *node)
<< ");" << be_uidt_nl
<< "servant_upcall.prepare_for_upcall (" << be_idt << be_idt_nl
<< "this->_object_key ()," << be_nl
- << "\"" << node->local_name () << "\"," << be_nl
- << "ACE_TRY_ENV" << be_uidt_nl
- << ");\n" << be_uidt;
+ << "\"" << node->local_name () << "\"";
+ if (!idl_global->exception_support ())
+ *os << "," << be_nl
+ << "ACE_TRY_ENV" << be_uidt_nl
+ << ");\n" << be_uidt;
+ else
+ *os << be_uidt_nl << ");\n" << be_uidt;
// check if there is an exception
if (!idl_global->exception_support ())