diff options
author | mayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-06-06 21:36:02 +0000 |
---|---|---|
committer | mayur <mayur@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-06-06 21:36:02 +0000 |
commit | 49dccf135fbb933fde13413f413a9f227ea9db20 (patch) | |
tree | 900e7ef3c5344e604da709ef884230234f1347b1 | |
parent | d73bcbbe15cac76b1005e75c71c571a323dac73f (diff) | |
download | ATCD-49dccf135fbb933fde13413f413a9f227ea9db20.tar.gz |
Thu Jun 6 13:36:22 2002 Mayur Deshpande <mayur@ics.uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 27 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation.cpp | 11 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp | 18 |
4 files changed, 54 insertions, 11 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index bfaf391a282..f9a5a7e3410 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,30 @@ +Thu Jun 6 13:36:22 2002 Mayur Deshpande <mayur@ics.uci.edu> + + * TAO_IDL/be/be_visitor_operation/operation.cpp (gen_throw_spec): + The 'throw_spec_close' generation logic was a 'bit off'. I had + changed the logic before by splitting the 'if' statement into + two separate parts. The 'throw_spec_close' generation was + supposed to generated if only all the 'if' conditions were met. + But, previously I had left the 'throw_spec_close' generation + code outside of the second if. I moved it into the second-if + and now the throw_spec close parenthesis are being generated + correctly. This should clean up all the broken AMI test builds. + The Throw spec generation for AMH is now listed as a separate + point: + -------------------------------------------------------------- + 2.6) Generate Throw Spec the confirms to raises clause of + original operation in IDL. + ------------------------------------------------------------- + + * TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp: + I had forgotten to check if it was an AMH Exception Holder + before generating the protected CORBA::Exception member + variable (2.4), thus this was generating the member variable for + all ExceptionHolders. This is now fixed. + + * TAO_IDL/be/be_visitor_valuetype/arglist.cpp: + Cosmetic changes. + Thu Jun 06 13:56:54 2002 Ossama Othman <ossama@uci.edu> * tao/PortableServer/Object_Adapter.cpp: diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp index 2b1e260de08..c4592f02e72 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp @@ -116,7 +116,7 @@ be_visitor_operation::is_amh_exception_holder (be_interface *node) if (last_E != 0 && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0) { - //ACE_DEBUG ((LM_DEBUG, "Passed second test of amh_excepholder \n")); + //ACE_DEBUG ((LM_DEBUG, "be_visitor_operation: Passed second test of amh_excepholder \n")); is_an_amh_exception_holder = 1; } } @@ -143,6 +143,10 @@ be_visitor_operation::gen_throw_spec (be_operation *node) UTL_Scope *scope = node->defined_in (); be_interface *iface = be_interface::narrow_from_scope ( scope ); + /***************************************************************************/ + // 2.6 + // Generate the Right Throw Spec if it is an AMH ExceptionHolder + /***************************************************************************/ // Check if this is (IF and it's not VT) or (it is an AMH ExceptionHolder). if (iface != 0) { @@ -176,11 +180,10 @@ be_visitor_operation::gen_throw_spec (be_operation *node) *os << excp->name (); } } + *os << be_uidt_nl << throw_spec_close << be_uidt; } - - *os << be_uidt_nl << throw_spec_close << be_uidt; } - + /*******************************************************************************/ return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp index f72daf715bc..89a3c0c5422 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/arglist.cpp @@ -68,7 +68,7 @@ be_visitor_obv_operation_arglist::is_amh_exception_holder (be_operation *node) if (last_E != 0 && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0) { - //ACE_DEBUG ((LM_DEBUG, "Passed second test of amh_excepholder \n")); + //ACE_DEBUG ((LM_DEBUG, "obv_operation: Passed second test of amh_excepholder \n")); is_an_amh_exception_holder = 1; } } @@ -136,12 +136,17 @@ be_visitor_obv_operation_arglist::visit_operation (be_operation *node) switch (this->ctx_->state ()) { case TAO_CodeGen::TAO_OBV_OPERATION_ARGLIST_CH: + /***********************************************************/ + // 2.1 // Each method is pure virtual in the Valuetype class. // BUT, not if it is an AMH ExceptionHolder! + /***********************************************************/ if (is_amh_exception_holder (node)) { - *os << "{ this->exception->_raise (); }" << be_uidt_nl; + *os << "{ this->exception->_raise (); }" + << be_uidt_nl; } + /***********************************************************/ else { *os << " = 0;" << be_uidt_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp index b2c71d9978b..83079b6f2c5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -186,12 +186,14 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) ** compiler again has to generate is superflous, unnecessary, more code ** bloat and unnecessary information for the app-programmer. The ** changes required for this (n the *C.h file) are: - ** 2.1) Generate the raise_method as non-abstract. + ** 2.1) Generate the raise_method as non-abstract and provide a definition + ** in place ** 2.2) Generate a new constructor that takes in a CORBA::Exception* ** 2.3) Make the destructor public (instead of protected) ** 2.4) Generate a private CORBA::Exception* field. ** 2.5) Generate the tao_marshal and tao_unmarshal methods as ** non-abstarct. + ** 2.6) Generate the right throw spec for the AMH ExceptionHolders ***************************************************************************/ /****************************************************************/ @@ -213,7 +215,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) if (last_E != 0 && ACE_OS::strcmp (last_E, "ExceptionHolder") == 0) { - //ACE_DEBUG ((LM_DEBUG, "Passed second test of amh_excepholder \n")); + //ACE_DEBUG ((LM_DEBUG, "visit_valuetype: Passed second test of amh_excepholder \n")); is_an_amh_exception_holder = 1; } } @@ -231,7 +233,10 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) /*********************************************************************/ // 2 if (is_an_amh_exception_holder) - *os << "public virtual CORBA_DefaultValueRefCountBase" << be_uidt_nl; + { + *os << "public virtual CORBA_DefaultValueRefCountBase" + << be_uidt_nl; + } /*********************************************************************/ else *os << "public virtual CORBA_ValueBase" << be_uidt_nl; @@ -339,8 +344,11 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) /*********************************************************/ // 2.4 - *os << "CORBA::Exception *exception;" - << be_nl; + if (is_an_amh_exception_holder) + { + *os << "CORBA::Exception *exception;" + << be_nl; + } /*********************************************************/ |