diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-03-06 04:03:20 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-03-06 04:03:20 +0000 |
commit | 8e58187f6fcb4fce3379f08e24bf67418b97ef0c (patch) | |
tree | 3118000e132f16421ac57ed5ef1eb55982287f49 | |
parent | 9e95ec747bd5526ae9801a58d2b3f668eb215687 (diff) | |
download | ATCD-8e58187f6fcb4fce3379f08e24bf67418b97ef0c.tar.gz |
ChangeLogTag:Mon Mar 5 19:32:56 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 17 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp | 13 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp | 13 |
8 files changed, 59 insertions, 46 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 35d945e7029..fc901806439 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,20 @@ +Mon Mar 5 19:32:56 2001 Ossama Othman <ossama@uci.edu> + + * TAO_IDL/be/be_visitor_array/any_op_cs.cpp (visit_array): + * TAO_IDL/be/be_visitor_enum/any_op_cs.cpp (visit_enum): + * TAO_IDL/be/be_visitor_exception/any_op_cs.cpp (visit_exception): + * TAO_IDL/be/be_visitor_interface/any_op_cs.cpp (visit_interface): + * TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp (visit_sequence): + * TAO_IDL/be/be_visitor_structure/any_op_cs.cpp (visit_structure): + * TAO_IDL/be/be_visitor_union/any_op_cs.cpp (visit_union): + + Fixed generated code that it does an ACE_TRY_CHECK before + checking the return value of the CORBA::TypeCode::equivalent() + call. This fixes a subtle problem where the return code could + be potentially meaningless due to the fact that an emulated + exception was thrown. This change also makes the code match the + semantics of native exceptions more closely. + Mon Mar 5 19:14:03 2001 Carlos O'Ryan <coryan@uci.edu> * performance-tests/Callback/client.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp index 6ede455da3a..21520b98926 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/any_op_cs.cpp @@ -85,10 +85,12 @@ be_visitor_array_any_op_cs::visit_array (be_array *node) << "{" << be_idt_nl << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) return 0; // not equal" << be_nl - << "ACE_TRY_CHECK;" << be_nl + << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl << be_nl + << "CORBA::Boolean result = type->equivalent (" << node->tc_name () + << ", ACE_TRY_ENV);" << be_nl + << "ACE_TRY_CHECK;" << be_nl << be_nl + << "if (!result)" << be_idt_nl + << "return 0; // not equivalent" << be_uidt_nl << be_nl << "if (_tao_any.any_owns_data ())" << be_nl << "{" << be_idt_nl << "_tao_elem = (" << node->name () << "_slice *)_tao_any.value ();" diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index 30dfde02ead..32d8a8139ae 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -70,13 +70,12 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) << "{" << be_idt_nl << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl + << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl << be_nl + << "CORBA::Boolean result = type->equivalent (" << node->tc_name () + << ", ACE_TRY_ENV);" << be_nl + << "ACE_TRY_CHECK;" << be_nl << be_nl + << "if (!result)" << be_idt_nl + << "return 0; // not equivalent" << be_uidt_nl << be_nl << "TAO_InputCDR stream (" << be_idt << be_idt_nl << "_tao_any._tao_get_cdr ()," << be_nl << "_tao_any._tao_byte_order ()" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index 45c68895da9..b4a02732ddf 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -97,13 +97,12 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) << "_tao_elem = 0;" << be_nl << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl + << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl << be_nl + << "CORBA::Boolean result = type->equivalent (" << node->tc_name () + << ", ACE_TRY_ENV);" << be_nl + << "ACE_TRY_CHECK;" << be_nl << be_nl + << "if (!result)" << be_idt_nl + << "return 0; // not equivalent" << be_uidt_nl << be_nl << "if (_tao_any.any_owns_data ())" << be_nl << "{" << be_idt_nl << "_tao_elem = (" << node->name () << " *)_tao_any.value ();" diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp index d354f4dea5a..cf7ef251b88 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp @@ -80,13 +80,12 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl << "_tao_elem = " << node->full_name () << "::_nil ();" << be_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl + << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl << be_nl + << "CORBA::Boolean result = type->equivalent (" << node->tc_name () + << ", ACE_TRY_ENV);" << be_nl + << "ACE_TRY_CHECK;" << be_nl << be_nl + << "if (!result)" << be_idt_nl + << "return 0; // not equivalent" << be_uidt_nl << be_nl << "TAO_InputCDR stream (" << be_idt << be_idt_nl << "_tao_any._tao_get_cdr ()," << be_nl << "_tao_any._tao_byte_order ()" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp index e6ae16c8c06..edba02bea4f 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp @@ -100,13 +100,12 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) << "_tao_elem = 0;" << be_nl << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl + << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl << be_nl + << "CORBA::Boolean result = type->equivalent (" << node->tc_name () + << ", ACE_TRY_ENV);" << be_nl + << "ACE_TRY_CHECK;" << be_nl << be_nl + << "if (!result)" << be_idt_nl + << "return 0; // not equivalent" << be_uidt_nl << be_nl << "if (_tao_any.any_owns_data ())" << be_nl << "{" << be_idt_nl << "_tao_elem = ACE_static_cast(" << be_idt << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index 04dbfab0d22..6642aafc200 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -95,13 +95,12 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << "_tao_elem = 0;" << be_nl << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl + << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl << be_nl + << "CORBA::Boolean result = type->equivalent (" << node->tc_name () + << ", ACE_TRY_ENV);" << be_nl + << "ACE_TRY_CHECK;" << be_nl << be_nl + << "if (!result)" << be_idt_nl + << "return 0; // not equivalent" << be_uidt_nl << be_nl << "if (_tao_any.any_owns_data ())" << be_nl << "{" << be_idt_nl << "_tao_elem = ACE_static_cast(" << be_idt << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index e8ad42ab833..92feeed2a52 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -108,13 +108,12 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) << "_tao_elem = 0;" << be_nl << "ACE_TRY_NEW_ENV" << be_nl << "{" << be_idt_nl - << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl - << "if (!type->equivalent (" << node->tc_name () - << ", ACE_TRY_ENV)) // not equal" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt_nl - << "ACE_TRY_CHECK;" << be_nl + << "CORBA::TypeCode_var type = _tao_any.type ();" << be_nl << be_nl + << "CORBA::Boolean result = type->equivalent (" << node->tc_name () + << ", ACE_TRY_ENV);" << be_nl + << "ACE_TRY_CHECK;" << be_nl << be_nl + << "if (!result)" << be_idt_nl + << "return 0; // not equivalent" << be_uidt_nl << be_nl << "if (_tao_any.any_owns_data ())" << be_nl << "{" << be_idt_nl << "_tao_elem = ACE_static_cast(" << be_idt << be_idt_nl |