diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-04-09 14:34:01 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-04-09 14:34:01 +0000 |
commit | 6cf77fcf9afd870009eef6490f64a7125271a5b1 (patch) | |
tree | 6b32629f894663e5e8094fcf30a87d969be99f79 | |
parent | eed9c1751846d6c70b2477cd424717240633bffa (diff) | |
download | ATCD-6cf77fcf9afd870009eef6490f64a7125271a5b1.tar.gz |
ChangeLogTag: Fri Apr 9 14:33:23 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
19 files changed, 207 insertions, 695 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 615c9835152..8b60a64575b 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,33 @@ +Fri Apr 9 14:33:23 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp: + * TAO_IDL/be/be_visitor_argument/paramlist.cpp: + * TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h: + * TAO_IDL/be_include/be_visitor_argument/paramlist.h: + + Removed these unused visitors. + + * TAO_IDL/be/be_visitor_argument.cpp: + * TAO_IDL/be_include/be_visitor_argument.h: + + Removed includes of the above visitor files. + + * TAO_IDL/be_include/be_codegen.h: + + Removed unused context state value. + + * TAO_IDL/be/be_visitor_argument/invoke_cs.cpp: + * TAO_IDL/be/be_visitor_argument/upcall_ss.cpp: + * TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp: + * TAO_IDL/be/be_visitor_argument/marshal_ss.cpp: + * TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp: + * TAO_IDL/be/be_visitor_operation/rettype.cpp: + * TAO_IDL/be/be_visitor_operation/argument.cpp: + * TAO_IDL/be/be_visitor_operation/argument_marshal.cpp: + * TAO_IDL/be/be_visitor_operation/argument_invoke.cpp: + + Code consolidation and cleanup. + Fri Apr 9 13:37:29 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_visitor_any_extracted_type_decl.cpp(visit_sequence): diff --git a/TAO/TAO_IDL/be/be_visitor_argument.cpp b/TAO/TAO_IDL/be/be_visitor_argument.cpp index 662ddac2c93..cf4b25d8a3c 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument.cpp @@ -12,7 +12,6 @@ */ //============================================================================= - #include "be_visitor_argument.h" #include "be_visitor_context.h" #include "be_argument.h" @@ -45,9 +44,7 @@ #include "be_visitor_argument/arglist.cpp" #include "be_visitor_argument/argument.cpp" #include "be_visitor_argument/marshal_ss.cpp" -#include "be_visitor_argument/post_upcall_ss.cpp" #include "be_visitor_argument/upcall_ss.cpp" #include "be_visitor_argument/vardecl_ss.cpp" #include "be_visitor_argument/invoke_cs.cpp" -#include "be_visitor_argument/paramlist.cpp" diff --git a/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp b/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp index 69b8732cd48..8ba0a965e8b 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/invoke_cs.cpp @@ -12,7 +12,6 @@ */ //============================================================================= - // **************************************************************************** // visitor for arguments passing to the CDR operators. // **************************************************************************** diff --git a/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp index 82581388e1b..cbe2eb7f952 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/marshal_ss.cpp @@ -13,7 +13,6 @@ */ //============================================================================= - // ************************************************************************ // Visitor to generate code for passing argument to the marshal/demarshal // routines @@ -38,9 +37,9 @@ int be_visitor_args_marshal_ss::visit_argument (be_argument *node) if (!bt) { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_argument - " - "Bad argument type\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_argument - ") + ACE_TEXT ("Bad argument type\n")), -1); } @@ -76,18 +75,18 @@ int be_visitor_args_marshal_ss::visit_argument (be_argument *node) else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_argument - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_argument - ") + ACE_TEXT ("Bad substate\n")), -1); } if (bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_argument - " - "cannot accept visitor\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_argument - ") + ACE_TEXT ("cannot accept visitor\n")), -1); } @@ -118,9 +117,9 @@ int be_visitor_args_marshal_ss::visit_argument (be_argument *node) else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_argument - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_argument - ") + ACE_TEXT ("Bad substate\n")), -1); } @@ -132,16 +131,15 @@ int be_visitor_args_marshal_ss::visit_array (be_array *) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = be_argument::narrow_from_decl (this->ctx_->node ()); + const char *lname = arg->local_name ()->get_string (); if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { switch (this->direction ()) { case AST_Argument::dir_IN: - *os << "_tao_forany_" << arg->local_name (); - break; case AST_Argument::dir_INOUT: - *os << "_tao_forany_" << arg->local_name (); + *os << "_tao_forany_" << lname; break; case AST_Argument::dir_OUT: break; @@ -154,19 +152,17 @@ int be_visitor_args_marshal_ss::visit_array (be_array *) case AST_Argument::dir_IN: break; case AST_Argument::dir_INOUT: - *os << "_tao_forany_" << arg->local_name (); - break; case AST_Argument::dir_OUT: - *os << "_tao_forany_" << arg->local_name (); + *os << "_tao_forany_" << lname; break; } } else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_array - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_array - ") + ACE_TEXT ("Bad substate\n")), -1); } @@ -178,6 +174,7 @@ int be_visitor_args_marshal_ss::visit_enum (be_enum *) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = be_argument::narrow_from_decl (this->ctx_->node ()); + const char *lname = arg->local_name ()->get_string (); if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { @@ -185,7 +182,7 @@ int be_visitor_args_marshal_ss::visit_enum (be_enum *) { case AST_Argument::dir_IN: case AST_Argument::dir_INOUT: - *os << arg->local_name (); + *os << lname; break; case AST_Argument::dir_OUT: break; @@ -199,16 +196,16 @@ int be_visitor_args_marshal_ss::visit_enum (be_enum *) break; case AST_Argument::dir_INOUT: case AST_Argument::dir_OUT: - *os << arg->local_name (); + *os << lname; break; } } else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_enum - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_enum - ") + ACE_TEXT ("Bad substate\n")), -1); } @@ -247,6 +244,7 @@ int be_visitor_args_marshal_ss::visit_predefined_type ( TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = be_argument::narrow_from_decl (this->ctx_->node ()); + const char *lname = arg->local_name ()->get_string (); if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { @@ -258,39 +256,25 @@ int be_visitor_args_marshal_ss::visit_predefined_type ( { case AST_PredefinedType::PT_pseudo: case AST_PredefinedType::PT_object: - *os << arg->local_name () << ".out ()"; - break; - case AST_PredefinedType::PT_any: - case AST_PredefinedType::PT_long: - case AST_PredefinedType::PT_ulong: - case AST_PredefinedType::PT_longlong: - case AST_PredefinedType::PT_ulonglong: - case AST_PredefinedType::PT_short: - case AST_PredefinedType::PT_ushort: - case AST_PredefinedType::PT_float: - case AST_PredefinedType::PT_double: - case AST_PredefinedType::PT_longdouble: - *os << arg->local_name (); + *os << lname << ".out ()"; break; case AST_PredefinedType::PT_char: - *os << "::ACE_InputCDR::to_char (" << arg->local_name () << ")"; + *os << "::ACE_InputCDR::to_char (" << lname << ")"; break; case AST_PredefinedType::PT_wchar: - *os << "::ACE_InputCDR::to_wchar (" << arg->local_name () << ")"; + *os << "::ACE_InputCDR::to_wchar (" << lname << ")"; break; case AST_PredefinedType::PT_boolean: - *os << "::ACE_InputCDR::to_boolean (" << arg->local_name () << ")"; + *os << "::ACE_InputCDR::to_boolean (" << lname << ")"; break; case AST_PredefinedType::PT_octet: - *os << "::ACE_InputCDR::to_octet (" << arg->local_name () << ")"; + *os << "::ACE_InputCDR::to_octet (" << lname << ")"; break; default: - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_predefined_type - " - "Bad predefined type\n"), - -1); + *os << lname; + break; } + break; case AST_Argument::dir_OUT: break; @@ -307,40 +291,23 @@ int be_visitor_args_marshal_ss::visit_predefined_type ( { case AST_PredefinedType::PT_pseudo: case AST_PredefinedType::PT_object: - *os << arg->local_name () << ".in ()"; - break; - case AST_PredefinedType::PT_any: - *os << arg->local_name (); - break; - case AST_PredefinedType::PT_long: - case AST_PredefinedType::PT_ulong: - case AST_PredefinedType::PT_longlong: - case AST_PredefinedType::PT_ulonglong: - case AST_PredefinedType::PT_short: - case AST_PredefinedType::PT_ushort: - case AST_PredefinedType::PT_float: - case AST_PredefinedType::PT_double: - case AST_PredefinedType::PT_longdouble: - *os << arg->local_name (); + *os << lname << ".in ()"; break; case AST_PredefinedType::PT_char: - *os << "::ACE_OutputCDR::from_char (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_char (" << lname << ")"; break; case AST_PredefinedType::PT_wchar: - *os << "::ACE_OutputCDR::from_wchar (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_wchar (" << lname << ")"; break; case AST_PredefinedType::PT_boolean: - *os << "::ACE_OutputCDR::from_boolean (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_boolean (" << lname << ")"; break; case AST_PredefinedType::PT_octet: - *os << "::ACE_OutputCDR::from_octet (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_octet (" << lname << ")"; break; default: - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_operation_rettype_compiled_marshal_ss::" - "visit_array - " - "Bad predefined type\n"), - -1); + *os << lname; + break; } break; case AST_Argument::dir_OUT: @@ -348,43 +315,26 @@ int be_visitor_args_marshal_ss::visit_predefined_type ( { case AST_PredefinedType::PT_pseudo: case AST_PredefinedType::PT_object: - *os << arg->local_name () << ".in ()"; + *os << lname << ".in ()"; break; case AST_PredefinedType::PT_any: - *os << arg->local_name () << ".in ()"; - break; - case AST_PredefinedType::PT_long: - case AST_PredefinedType::PT_ulong: - case AST_PredefinedType::PT_longlong: - case AST_PredefinedType::PT_ulonglong: - case AST_PredefinedType::PT_short: - case AST_PredefinedType::PT_ushort: - case AST_PredefinedType::PT_float: - case AST_PredefinedType::PT_double: - case AST_PredefinedType::PT_longdouble: - *os << arg->local_name (); + *os << lname << ".in ()"; break; case AST_PredefinedType::PT_char: - *os << "::ACE_OutputCDR::from_char (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_char (" << lname << ")"; break; case AST_PredefinedType::PT_wchar: - *os << "::ACE_OutputCDR::from_wchar (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_wchar (" << lname << ")"; break; case AST_PredefinedType::PT_boolean: - *os << "::ACE_OutputCDR::from_boolean (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_boolean (" << lname << ")"; break; case AST_PredefinedType::PT_octet: - *os << "::ACE_OutputCDR::from_octet (" << arg->local_name () << ")"; + *os << "::ACE_OutputCDR::from_octet (" << lname << ")"; break; default: - ACE_ERROR_RETURN (( - LM_ERROR, - "be_visitor_operation_rettype_compiled_marshal_ss::" - "visit_array - " - "Bad predefined type\n" - ), - -1 - ); + *os << lname; + break; } break; } @@ -406,6 +356,7 @@ int be_visitor_args_marshal_ss::visit_sequence (be_sequence *) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = be_argument::narrow_from_decl (this->ctx_->node ()); + const char *lname = arg->local_name ()->get_string (); if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { @@ -413,7 +364,7 @@ int be_visitor_args_marshal_ss::visit_sequence (be_sequence *) { case AST_Argument::dir_IN: case AST_Argument::dir_INOUT: - *os << arg->local_name (); + *os << lname; break; case AST_Argument::dir_OUT: break; @@ -426,19 +377,19 @@ int be_visitor_args_marshal_ss::visit_sequence (be_sequence *) case AST_Argument::dir_IN: break; case AST_Argument::dir_INOUT: - *os << arg->local_name (); + *os << lname; break; case AST_Argument::dir_OUT: - *os << arg->local_name () << ".in ()"; + *os << lname << ".in ()"; break; } } else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_interface - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_interface - ") + ACE_TEXT ("Bad substate\n")), -1); } @@ -450,6 +401,10 @@ int be_visitor_args_marshal_ss::visit_string (be_string *node) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = be_argument::narrow_from_decl (this->ctx_->node ()); + const char *lname = arg->local_name ()->get_string (); + ACE_CDR::ULong bound = node->max_size ()->ev ()->u.ulval; + bool wide = + (node->width () != static_cast<long> (sizeof (char))); if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { @@ -457,26 +412,17 @@ int be_visitor_args_marshal_ss::visit_string (be_string *node) { case AST_Argument::dir_IN: case AST_Argument::dir_INOUT: - // we need to make a distinction between bounded and unbounded strings - if (node->max_size ()->ev ()->u.ulval == 0) + if (bound == 0) { - *os << arg->local_name () << ".out ()"; + *os << lname << ".out ()"; } else { - if (node->width () == (long) sizeof (char)) - { - *os << "::ACE_InputCDR::to_string ("; - } - else - { - *os << "::ACE_InputCDR::to_wstring ("; - } - - *os << arg->local_name () << ".out (), " - << node->max_size ()->ev ()->u.ulval - << ")"; + *os << "::ACE_InputCDR::to_" + << (wide ? "w" : "" ) << "string (" + << lname << ".out (), " << bound << ")"; } + break; case AST_Argument::dir_OUT: break; @@ -485,39 +431,31 @@ int be_visitor_args_marshal_ss::visit_string (be_string *node) else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT) { // we need to make a distinction between bounded and unbounded strings - if (node->max_size ()->ev ()->u.ulval == 0) + if (bound == 0) { - // unbounded switch (this->direction ()) { case AST_Argument::dir_IN: break; case AST_Argument::dir_INOUT: case AST_Argument::dir_OUT: - *os << arg->local_name () << ".in ()"; + *os << lname << ".in ()"; break; } } else { - // bounded switch (this->direction ()) { case AST_Argument::dir_IN: break; case AST_Argument::dir_INOUT: case AST_Argument::dir_OUT: - if (node->width () == (long) sizeof (char)) - { - *os << "::ACE_OutputCDR::from_string ((char *)"; - } - else - { - *os << "::ACE_OutputCDR::from_wstring ((CORBA::WChar *)"; - } - - *os << arg->local_name () << ".in (), " - << node->max_size ()->ev ()->u.ulval << ")"; + *os << "::ACE_OutputCDR::from_" + << (wide ? "w" : "" ) << "string ((" + << (wide ? "CORBA::WChar" : "char") << " *)" + << lname << ".in (), " << bound << ")"; + break; } } @@ -525,9 +463,9 @@ int be_visitor_args_marshal_ss::visit_string (be_string *node) else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_string - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_string - ") + ACE_TEXT ("Bad substate\n")), -1); } @@ -551,9 +489,10 @@ int be_visitor_args_marshal_ss::visit_typedef (be_typedef *node) if (node->primitive_base_type ()->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::" - "visit_typedef - " - "accept on primitive type failed\n"), + ACE_TEXT ("be_visitor_args_marshal_ss::") + ACE_TEXT ("visit_typedef - ") + ACE_TEXT ("accept on primitive ") + ACE_TEXT ("type failed\n")), -1); } @@ -607,6 +546,7 @@ be_visitor_args_marshal_ss::emit_common (void) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = be_argument::narrow_from_decl (this->ctx_->node ()); + const char *lname = arg->local_name ()->get_string (); if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { @@ -614,7 +554,7 @@ be_visitor_args_marshal_ss::emit_common (void) { case AST_Argument::dir_IN: case AST_Argument::dir_INOUT: - *os << arg->local_name () << ".out ()"; + *os << lname << ".out ()"; break; case AST_Argument::dir_OUT: break; @@ -628,15 +568,16 @@ be_visitor_args_marshal_ss::emit_common (void) break; case AST_Argument::dir_INOUT: case AST_Argument::dir_OUT: - *os << arg->local_name () << ".in ()"; + *os << lname << ".in ()"; break; } } else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::emit_common - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss") + ACE_TEXT ("::emit_common - ") + ACE_TEXT ("Bad substate\n")), -1); } @@ -650,6 +591,8 @@ be_visitor_args_marshal_ss::emit_common2 (be_type *node) TAO_OutStream *os = this->ctx_->stream (); be_argument *arg = be_argument::narrow_from_decl (this->ctx_->node ()); + const char *lname = arg->local_name ()->get_string (); + AST_Type::SIZE_TYPE st = node->size_type (); if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { @@ -657,7 +600,7 @@ be_visitor_args_marshal_ss::emit_common2 (be_type *node) { case AST_Argument::dir_IN: case AST_Argument::dir_INOUT: - *os << arg->local_name (); + *os << lname; break; case AST_Argument::dir_OUT: break; @@ -670,21 +613,21 @@ be_visitor_args_marshal_ss::emit_common2 (be_type *node) case AST_Argument::dir_IN: break; case AST_Argument::dir_INOUT: - *os << arg->local_name (); + *os << lname; break; case AST_Argument::dir_OUT: - if (node->size_type () == AST_Type::VARIABLE) - *os << arg->local_name () << ".in ()"; - else - *os << arg->local_name (); + *os << lname + << (st == AST_Type::VARIABLE ? ".in ()" : ""); + break; } } else { ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_marshal_ss::emit_common2 - " - "Bad substate\n"), + ACE_TEXT ("be_visitor_args_marshal_ss") + ACE_TEXT ("::emit_common2 - ") + ACE_TEXT ("Bad substate\n")), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/paramlist.cpp b/TAO/TAO_IDL/be/be_visitor_argument/paramlist.cpp deleted file mode 100644 index 2c917295603..00000000000 --- a/TAO/TAO_IDL/be/be_visitor_argument/paramlist.cpp +++ /dev/null @@ -1,229 +0,0 @@ - -//============================================================================= -/** - * @file paramlist.cpp - * - * $Id$ - * - * Visitor that generates the Dyanmic::ParameterList - * - * - * @author Kirthika Parameswaran <kirthika@cs.wustl.edu> Ossama Othman <ossama@uci.edu> - */ -//============================================================================= - - -// ************************************************************ -// be_visitor_args_paramlist for parameter list in method declarations and -// definitions -// ************************************************************ - -be_visitor_args_paramlist::be_visitor_args_paramlist (be_visitor_context *ctx) - : be_visitor_args (ctx) -{ -} - -be_visitor_args_paramlist::~be_visitor_args_paramlist (void) -{ -} - -int be_visitor_args_paramlist::visit_argument (be_argument *node) -{ - // Get output stream. - TAO_OutStream *os = this->ctx_->stream (); - - // Save the argument node. - this->ctx_->node (node); - - // We do not put "out" arguments into the arglist. - if (this->direction () == AST_Argument::dir_OUT) - { - return 0; - } - - // Retrieve the type. - be_type *bt = be_type::narrow_from_decl (node->field_type ()); - - // If node is typedef'd, we must strip it off. - if (bt->node_type () == AST_Decl::NT_typedef) - { - be_typedef *td = be_typedef::narrow_from_decl (bt); - bt = td->primitive_base_type (); - } - - if (!bt) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_arglist::" - "visit_argument - " - "Bad argument type\n"), - -1); - } - - // Generate valuetype check: this hack is needed as there is no - // available way to check for valuetype type. - // Any operators for valuetypes arent there so we dont add it to the - // paramlist. - if (bt->node_type () == AST_Decl::NT_interface) - { - be_valuetype *vt = be_valuetype::narrow_from_decl (node->field_type ()); - - // @@ NOTE: If this check is removed, and insertion operators - // for valuetypes are implemented, don't forget to also - // remove the same valuetype check in - // be_visitor_operation::count_non_out_parameters(). - - // If it is a valuetype just return. - if (vt) - { - return 0; - } - } - - // Amazed by the zillion os operators below? Its just to combat - // side effects functions like type_name() have on the os stream. - // This was causing a problem with the stubs not been generated accurately - // on Linux using egcs. - if (bt->node_type () == AST_Decl::NT_array) - { - *os << this->type_name (bt, "_forany"); - *os << " _tao_forany_" << node->local_name () << " ("; - *os << this->type_name (bt, "_dup"); - *os << " ("; - - if (this->direction () != AST_Argument::dir_IN) - { - *os << "(const ::" << bt->name () << "_slice *) "; - } - - *os << "this->"; - *os << node->local_name () << "_));" << be_nl; - *os << "(*parameter_list)[len].argument <<= _tao_forany_" ; - *os << node->local_name () << ";" << be_nl; - } - else - { - *os << "(*parameter_list)[len].argument <<= "; - // Insertion into an Any has some special cases which need to be - // dealt with. - - switch (bt->node_type ()) - { - case AST_Decl::NT_pre_defined: - case AST_Decl::NT_string: - case AST_Decl::NT_wstring: - if (bt->accept (this) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_paramlist::" - "visit_argument - " - "cannot accept visitor\n"), - -1); - } - break; - - default: - *os << " this->" << node->local_name () << "_;"; - - } - } - - *os << be_nl; - - // Set the appropriate mode for each parameter. - switch (node->direction ()) - { - case AST_Argument::dir_IN: - *os << "(*parameter_list)[len].mode = ::CORBA::PARAM_IN;" << be_nl; - break; - case AST_Argument::dir_INOUT: - *os << "(*parameter_list)[len].mode = ::CORBA::PARAM_INOUT;" << be_nl; - break; - case AST_Argument::dir_OUT: - *os << "(*parameter_list)[len].mode = ::CORBA::PARAM_OUT;" << be_nl; - break; - default: - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_args_paramlist::" - "visit_argument - " - "Bad context\n"), - -1); - } - - *os << "len++;" << be_nl; - - - return 0; -} - -int -be_visitor_args_paramlist::visit_string (be_string *node) -{ - // Get output stream. - TAO_OutStream *os = this->ctx_->stream (); - - // Get the argument. - be_argument *arg = - be_argument::narrow_from_decl (this->ctx_->node ()); - - // We need to make a distinction between bounded and unbounded strings. - if (node->max_size ()->ev ()->u.ulval != 0) - { - // Bounded strings. - if (node->width () == (long) sizeof (char)) - { - *os << "::ACE_OutputCDR::from_string ((char *)"; - } - else - { - *os << "::ACE_OutputCDR::from_wstring ((CORBA::WChar *)"; - } - - *os << arg->local_name () << "_, " - << node->max_size ()->ev ()->u.ulval - << ");"; - } - else - { - *os << arg->local_name () <<"_;"; - } - - return 0; -} - -int -be_visitor_args_paramlist::visit_predefined_type ( - be_predefined_type *node) -{ - // Get output stream. - TAO_OutStream *os = this->ctx_->stream (); - - // Get the argument. - be_argument *arg = - be_argument::narrow_from_decl (this->ctx_->node ()); - - switch (node->pt ()) - { - case AST_PredefinedType::PT_boolean: - *os << "::ACE_OutputCDR::from_boolean (this->"; - *os << arg->local_name () << "_);"; - break; - case AST_PredefinedType::PT_char: - *os << "::ACE_OutputCDR::from_char (this->"; - *os << arg->local_name () << "_);"; - break; - case AST_PredefinedType::PT_wchar: - *os << "::ACE_OutputCDR::from_wchar (this->"; - *os << arg->local_name () << "_);"; - break; - case AST_PredefinedType::PT_octet: - *os << "::ACE_OutputCDR::from_octet (this->"; - *os << arg->local_name () << "_);"; - break; - default: - *os << arg->local_name () << "_;"; - break; - } - - return 0; -} diff --git a/TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp deleted file mode 100644 index 887e166f7b2..00000000000 --- a/TAO/TAO_IDL/be/be_visitor_argument/post_upcall_ss.cpp +++ /dev/null @@ -1,125 +0,0 @@ - -//============================================================================= -/** - * @file post_upcall_ss.cpp - * - * $Id$ - * - * Visitor generating code to do post-processing of arguments following an - * upcall. - * - * - * @author Aniruddha Gokhale - */ -//============================================================================= - - -// ************************************************************************ -// visitor for doing any post-processing after the upcall is made -// ************************************************************************ - -be_visitor_args_post_upcall_ss::be_visitor_args_post_upcall_ss ( - be_visitor_context *ctx - ) - : be_visitor_scope (ctx) -{ -} - -be_visitor_args_post_upcall_ss::~be_visitor_args_post_upcall_ss (void) -{ -} - -int -be_visitor_args_post_upcall_ss::visit_operation (be_operation *node) -{ - return this->visit_scope (node); -} - -int be_visitor_args_post_upcall_ss::visit_argument (be_argument *node) -{ - this->ctx_->node (node); // save the argument node - - // retrieve the type - be_type *bt = be_type::narrow_from_decl (node->field_type ()); - - if (!bt) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_post_upcall::" - "visit_argument - " - "Bad argument type\n"), - -1); - } - - // Different types have different mappings when used as in/out or - // inout parameters. Let this visitor deal with the type - - if (bt->accept (this) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_post_upcall::" - "visit_argument - " - "cannot accept visitor\n"), - -1); - } - - return 0; -} - -int be_visitor_args_post_upcall_ss::visit_array (be_array *node) -{ - TAO_OutStream *os = this->ctx_->stream (); - be_argument *arg = - be_argument::narrow_from_decl (this->ctx_->node ()); - - // if the current type is an alias, use that - be_type *bt = node; - - if (this->ctx_->alias ()) - { - bt = this->ctx_->alias (); - } - - switch (arg->direction ()) - { - case AST_Argument::dir_IN: - break; - case AST_Argument::dir_INOUT: - break; - case AST_Argument::dir_OUT: - if (node->size_type () == be_type::VARIABLE) - { - *os << bt->name () << "_forany _tao_forany_" - << arg->local_name () << " (" << be_idt << be_idt_nl - << arg->local_name () << ".inout ()" << be_uidt_nl - << ");\n" << be_uidt; - } - else - { - *os << bt->name () << "_forany _tao_forany_" - << arg->local_name () << " (" << be_idt << be_idt_nl - << arg->local_name () << be_uidt_nl - << ");\n" << be_uidt; - } - - break; - } - return 0; -} - -int be_visitor_args_post_upcall_ss::visit_typedef (be_typedef *node) -{ - this->ctx_->alias (node); - - if (node->primitive_base_type ()->accept (this) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "be_visitor_args_post_upcall::" - "visit_typedef - " - "accept on primitive type failed\n"), - -1); - } - - this->ctx_->alias (0); - return 0; -} diff --git a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp index 84e17cfc4fc..4a93ec0b6b9 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/upcall_ss.cpp @@ -13,7 +13,6 @@ */ //============================================================================= - // ************************************************************************ // visitor for passing arguments to the upcall // ************************************************************************ diff --git a/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp index 6aa3e0e35e8..be333c10fa7 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp @@ -13,7 +13,6 @@ */ //============================================================================= - // ************************************************************************ // Visitor to generate code for argument variable declaration // ************************************************************************ diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp index 35be7beb37c..d6c3108cfb3 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp @@ -13,8 +13,7 @@ #include "ace/SString.h" be_visitor_amh_operation_ss::be_visitor_amh_operation_ss ( - be_visitor_context *ctx - ) + be_visitor_context *ctx) : be_visitor_operation (ctx) { } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp index 4e0c0c0db38..03e719d5e9f 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/argument.cpp @@ -12,7 +12,6 @@ */ //============================================================================= - // ************************************************************ // Generic operation visitor to handle the pre/post // do_static_call/upcall stuff with arguments. @@ -41,7 +40,6 @@ be_visitor_operation_argument::post_process (be_decl *bd) { case TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS: case TAO_CodeGen::TAO_OPERATION_ARG_DEMARSHAL_SS: - case TAO_CodeGen::TAO_OPERATION_ARG_MARSHAL_SS: if (!this->last_node (bd)) { *os << "," << be_nl; @@ -141,12 +139,6 @@ be_visitor_operation_argument::visit_argument (be_argument *node) status = node->accept (&visitor); break; } - case TAO_CodeGen::TAO_OPERATION_ARG_MARSHAL_SS: - { - be_visitor_args_marshal_ss visitor (&ctx); - status = node->accept (&visitor); - break; - } case TAO_CodeGen::TAO_OPERATION_COLLOCATED_ARG_UPCALL_SS: { ctx.state (TAO_CodeGen::TAO_ARGUMENT_COLLOCATED_UPCALL_SS); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp index 17be11babac..b0ff9d80ba5 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp @@ -14,7 +14,6 @@ */ //============================================================================= - // ************************************************************ // operation visitor to handle the passing of arguments to the CDR operators // ************************************************************ @@ -46,7 +45,7 @@ be_visitor_operation_argument_invoke::pre_process (be_decl *bd) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) " "be_visitor_operation_argument_invoke" - "::post_process - " + "::pre_process - " "Bad argument node\n"), -1); } @@ -110,6 +109,7 @@ be_visitor_operation_argument_invoke::post_process (be_decl *bd) "Bad argument node\n"), -1); } + switch (this->ctx_->sub_state ()) { case TAO_CodeGen::TAO_CDR_OUTPUT: @@ -156,6 +156,7 @@ be_visitor_operation_argument_invoke::post_process (be_decl *bd) "Bad sub state\n"), -1); } + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp index 52e6b9dc3ad..b349e15e088 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/argument_marshal.cpp @@ -14,7 +14,6 @@ */ //============================================================================= - // ************************************************************ // operation visitor to handle the passing of arguments to the CDR operators // ************************************************************ @@ -46,10 +45,11 @@ be_visitor_operation_argument_marshal::pre_process (be_decl *bd) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) " "be_visitor_operation_argument_marshal" - "::post_process - " + "::pre_process - " "Bad argument node\n"), -1); } + switch (arg->direction ()) { case AST_Argument::dir_IN: @@ -109,6 +109,7 @@ be_visitor_operation_argument_marshal::post_process (be_decl *bd) "Bad argument node\n"), -1); } + switch (this->ctx_->sub_state ()) { case TAO_CodeGen::TAO_CDR_INPUT: @@ -261,7 +262,8 @@ be_visitor_args_decl::visit_typedef (be_typedef *node) { this->ctx_->alias (node); - // the node to be visited in the base primitve type that gets typedefed + // The node to be visited in the base primitve + // type that gets typedefed. be_type *bt = node->primitive_base_type (); if (!bt || (bt->accept (this) == -1)) diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index a8d6ff41766..b4f1de55984 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -12,7 +12,6 @@ */ //============================================================================= - // ************************************************************ // Operation visitor for server skeletons // ************************************************************ @@ -26,21 +25,6 @@ be_visitor_operation_ss::~be_visitor_operation_ss (void) { } -// // Processing to be done after every element in the scope is processed. -// int -// be_visitor_operation_ss::post_process (be_decl *bd) -// { -// // All we do here is to insert a comma and a newline. -// TAO_OutStream *os = this->ctx_->stream (); - -// if (!this->last_node (bd)) -// { -// *os << ",\n"; -// } - -// return 0; -// } - int be_visitor_operation_ss::visit_operation (be_operation * node) { diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp index b1b871e78c9..6bc0eb7eaf5 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp @@ -12,7 +12,6 @@ */ //============================================================================= - // **************************************************************************** // Operation visitor for return types. This generates the mapping for a return // type in an operation signature @@ -30,7 +29,8 @@ be_visitor_operation_rettype::~be_visitor_operation_rettype (void) } int -be_visitor_operation_rettype::visit_array (be_array *node) +be_visitor_operation_rettype::visit_array ( + be_array *node) { *os << "::" << this->type_name (node) << "_slice *"; @@ -38,7 +38,8 @@ be_visitor_operation_rettype::visit_array (be_array *node) } int -be_visitor_operation_rettype::visit_enum (be_enum *node) +be_visitor_operation_rettype::visit_enum ( + be_enum *node) { *os << "::" << this->type_name (node); @@ -46,7 +47,8 @@ be_visitor_operation_rettype::visit_enum (be_enum *node) } int -be_visitor_operation_rettype::visit_interface (be_interface *node) +be_visitor_operation_rettype::visit_interface ( + be_interface *node) { *os << "::" << this->type_name (node) << "_ptr"; @@ -54,7 +56,8 @@ be_visitor_operation_rettype::visit_interface (be_interface *node) } int -be_visitor_operation_rettype::visit_interface_fwd (be_interface_fwd *node) +be_visitor_operation_rettype::visit_interface_fwd ( + be_interface_fwd *node) { *os << "::" << this->type_name (node) << "_ptr"; @@ -62,7 +65,8 @@ be_visitor_operation_rettype::visit_interface_fwd (be_interface_fwd *node) } int -be_visitor_operation_rettype::visit_native (be_native *node) +be_visitor_operation_rettype::visit_native ( + be_native *node) { *os << "::" << this->type_name (node); @@ -70,7 +74,8 @@ be_visitor_operation_rettype::visit_native (be_native *node) } int -be_visitor_operation_rettype::visit_predefined_type (be_predefined_type *node) +be_visitor_operation_rettype::visit_predefined_type ( + be_predefined_type *node) { be_type *bt = 0; @@ -124,10 +129,11 @@ be_visitor_operation_rettype::visit_predefined_type (be_predefined_type *node) } int -be_visitor_operation_rettype::visit_sequence (be_sequence *node) +be_visitor_operation_rettype::visit_sequence ( + be_sequence *node) { - // We should never directly be here because anonymous sequence return types - // are not allowed. + // We should never directly be here because anonymous + // sequence return types are not allowed. *os << "::" << this->type_name (node) << " *"; return 0; @@ -149,7 +155,8 @@ be_visitor_operation_rettype::visit_string (be_string *node) } int -be_visitor_operation_rettype::visit_structure (be_structure *node) +be_visitor_operation_rettype::visit_structure ( + be_structure *node) { *os << "::" << this->type_name (node); @@ -164,7 +171,8 @@ be_visitor_operation_rettype::visit_structure (be_structure *node) } int -be_visitor_operation_rettype::visit_typedef (be_typedef *node) +be_visitor_operation_rettype::visit_typedef ( + be_typedef *node) { // Set the alias node. this->ctx_->alias (node); @@ -183,12 +191,13 @@ be_visitor_operation_rettype::visit_typedef (be_typedef *node) } int -be_visitor_operation_rettype::visit_union (be_union *node) +be_visitor_operation_rettype::visit_union ( + be_union *node) { *os << "::" << this->type_name (node); - // Based on whether we are variable or not, we return a pointer or the - // aggregate type. + // Based on whether we are variable or not, we return + // a pointer or the aggregate type. if (node->size_type () == AST_Type::VARIABLE) { *os << " *"; @@ -198,7 +207,8 @@ be_visitor_operation_rettype::visit_union (be_union *node) } int -be_visitor_operation_rettype::visit_valuetype (be_valuetype *node) +be_visitor_operation_rettype::visit_valuetype ( + be_valuetype *node) { *os << "::" << this->type_name (node) << " *"; @@ -206,7 +216,8 @@ be_visitor_operation_rettype::visit_valuetype (be_valuetype *node) } int -be_visitor_operation_rettype::visit_valuetype_fwd (be_valuetype_fwd *node) +be_visitor_operation_rettype::visit_valuetype_fwd ( + be_valuetype_fwd *node) { *os << "::" << this->type_name (node) << " *"; @@ -214,25 +225,29 @@ be_visitor_operation_rettype::visit_valuetype_fwd (be_valuetype_fwd *node) } int -be_visitor_operation_rettype::visit_component (be_component *node) +be_visitor_operation_rettype::visit_component ( + be_component *node) { return this->visit_interface (node); } int -be_visitor_operation_rettype::visit_component_fwd (be_component_fwd *node) +be_visitor_operation_rettype::visit_component_fwd ( + be_component_fwd *node) { return this->visit_interface_fwd (node); } int -be_visitor_operation_rettype::visit_eventtype (be_eventtype *node) +be_visitor_operation_rettype::visit_eventtype ( + be_eventtype *node) { return this->visit_valuetype (node); } int -be_visitor_operation_rettype::visit_eventtype_fwd (be_eventtype_fwd *node) +be_visitor_operation_rettype::visit_eventtype_fwd ( + be_eventtype_fwd *node) { return this->visit_valuetype_fwd (node); } @@ -244,7 +259,8 @@ be_visitor_operation_rettype::visit_home (be_home *node) } int -be_visitor_operation_rettype::visit_valuebox (be_valuebox *node) +be_visitor_operation_rettype::visit_valuebox ( + be_valuebox *node) { *os << "::" << this->type_name (node) << " *"; @@ -256,7 +272,7 @@ be_visitor_operation_rettype::type_name (be_type *node) { be_type *bt = 0; - if (this->ctx_->alias ()) + if (this->ctx_->alias () != 0) { // A typedefed return type. bt = this->ctx_->alias (); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp index 8f98370caec..fff9050a710 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype_return_cs.cpp @@ -12,7 +12,6 @@ */ //============================================================================= - // ************************************************************ // be_visitor_operation_rettype_return_cs // @@ -31,7 +30,8 @@ be_visitor_operation_rettype_return_cs:: } int -be_visitor_operation_rettype_return_cs::visit_array (be_array *) +be_visitor_operation_rettype_return_cs::visit_array ( + be_array *) { TAO_OutStream *os = this->ctx_->stream (); @@ -41,7 +41,8 @@ be_visitor_operation_rettype_return_cs::visit_array (be_array *) } int -be_visitor_operation_rettype_return_cs::visit_enum (be_enum *) +be_visitor_operation_rettype_return_cs::visit_enum ( + be_enum *) { TAO_OutStream *os = this->ctx_->stream (); @@ -51,7 +52,8 @@ be_visitor_operation_rettype_return_cs::visit_enum (be_enum *) } int -be_visitor_operation_rettype_return_cs::visit_interface (be_interface *) +be_visitor_operation_rettype_return_cs::visit_interface ( + be_interface *) { TAO_OutStream *os = this->ctx_->stream (); @@ -61,7 +63,8 @@ be_visitor_operation_rettype_return_cs::visit_interface (be_interface *) } int -be_visitor_operation_rettype_return_cs::visit_interface_fwd (be_interface_fwd *) +be_visitor_operation_rettype_return_cs::visit_interface_fwd ( + be_interface_fwd *) { TAO_OutStream *os = this->ctx_->stream (); @@ -71,7 +74,8 @@ be_visitor_operation_rettype_return_cs::visit_interface_fwd (be_interface_fwd *) } int -be_visitor_operation_rettype_return_cs::visit_valuebox (be_valuebox *) +be_visitor_operation_rettype_return_cs::visit_valuebox ( + be_valuebox *) { TAO_OutStream *os = this->ctx_->stream (); @@ -81,7 +85,8 @@ be_visitor_operation_rettype_return_cs::visit_valuebox (be_valuebox *) } int -be_visitor_operation_rettype_return_cs::visit_valuetype (be_valuetype *) +be_visitor_operation_rettype_return_cs::visit_valuetype ( + be_valuetype *) { TAO_OutStream *os = this->ctx_->stream (); @@ -91,7 +96,8 @@ be_visitor_operation_rettype_return_cs::visit_valuetype (be_valuetype *) } int -be_visitor_operation_rettype_return_cs::visit_valuetype_fwd (be_valuetype_fwd *) +be_visitor_operation_rettype_return_cs::visit_valuetype_fwd ( + be_valuetype_fwd *) { TAO_OutStream *os = this->ctx_->stream (); @@ -130,7 +136,8 @@ be_visitor_operation_rettype_return_cs::visit_predefined_type ( } int -be_visitor_operation_rettype_return_cs::visit_sequence (be_sequence *) +be_visitor_operation_rettype_return_cs::visit_sequence ( + be_sequence *) { TAO_OutStream *os = this->ctx_->stream (); @@ -140,7 +147,8 @@ be_visitor_operation_rettype_return_cs::visit_sequence (be_sequence *) } int -be_visitor_operation_rettype_return_cs::visit_string (be_string *) +be_visitor_operation_rettype_return_cs::visit_string ( + be_string *) { TAO_OutStream *os = this->ctx_->stream (); @@ -150,7 +158,8 @@ be_visitor_operation_rettype_return_cs::visit_string (be_string *) } int -be_visitor_operation_rettype_return_cs::visit_structure (be_structure *node) +be_visitor_operation_rettype_return_cs::visit_structure ( + be_structure *node) { TAO_OutStream *os = this->ctx_->stream (); @@ -167,7 +176,8 @@ be_visitor_operation_rettype_return_cs::visit_structure (be_structure *node) } int -be_visitor_operation_rettype_return_cs::visit_typedef (be_typedef *node) +be_visitor_operation_rettype_return_cs::visit_typedef ( + be_typedef *node) { this->ctx_->alias (node); @@ -185,7 +195,8 @@ be_visitor_operation_rettype_return_cs::visit_typedef (be_typedef *node) } int -be_visitor_operation_rettype_return_cs::visit_union (be_union *node) +be_visitor_operation_rettype_return_cs::visit_union ( + be_union *node) { TAO_OutStream *os = this->ctx_->stream (); @@ -202,7 +213,8 @@ be_visitor_operation_rettype_return_cs::visit_union (be_union *node) } int -be_visitor_operation_rettype_return_cs::visit_component (be_component *node) +be_visitor_operation_rettype_return_cs::visit_component ( + be_component *node) { return this->visit_interface (node); } @@ -216,7 +228,8 @@ be_visitor_operation_rettype_return_cs::visit_component_fwd ( } int -be_visitor_operation_rettype_return_cs::visit_eventtype (be_eventtype *node) +be_visitor_operation_rettype_return_cs::visit_eventtype ( + be_eventtype *node) { return this->visit_valuetype (node); } @@ -230,7 +243,8 @@ be_visitor_operation_rettype_return_cs::visit_eventtype_fwd ( } int -be_visitor_operation_rettype_return_cs::visit_home (be_home *node) +be_visitor_operation_rettype_return_cs::visit_home ( + be_home *node) { return this->visit_interface (node); } diff --git a/TAO/TAO_IDL/be_include/be_codegen.h b/TAO/TAO_IDL/be_include/be_codegen.h index ef0cdddb308..bde5952dc6d 100644 --- a/TAO/TAO_IDL/be_include/be_codegen.h +++ b/TAO/TAO_IDL/be_include/be_codegen.h @@ -97,24 +97,21 @@ public: TAO_OPERATION_ARGLIST_PROXY_IMPL_XS, - TAO_OPERATION_ARGLIST_IH, // ... for implementation header TAO_OPERATION_ARGLIST_IS, // ... for implementation header TAO_OPERATION_ARGLIST_COLLOCATED_SH, // ... for collocated server - // variable to do_static_call + // variable to do_static_call TAO_OPERATION_ARG_INVOKE_CS, // passing argument variable to do_static_call - // after do_static_call + // after do_static_call TAO_OPERATION_ARG_DECL_SS, // argument decl in skeleton TAO_OPERATION_ARG_DEMARSHAL_SS, // and argument variables to the - TAO_OPERATION_ARG_MARSHAL_SS, - // variable + // variable TAO_OPERATION_ARG_UPCALL_SS, // variables to upcall TAO_OPERATION_COLLOCATED_ARG_UPCALL_SS, // variables to upcall for - // collocated op + // collocated op TAO_OBV_OPERATION_ARGLIST_CH, // parameter list in obv op signature TAO_OBV_OPERATION_ARGLIST_CS, // used only for AMH exceptions - // ... for client header TAO_OBV_OPERATION_ARGLIST_SH, // ... for server header TAO_OBV_OPERATION_ARGLIST_IH, // ... for implementation header TAO_OBV_OPERATION_ARGLIST_IS, // ... for implementation header diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument.h b/TAO/TAO_IDL/be_include/be_visitor_argument.h index 3b8ac67e5ab..f58aa45467c 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_argument.h +++ b/TAO/TAO_IDL/be_include/be_visitor_argument.h @@ -14,7 +14,6 @@ */ //============================================================================= - #ifndef _BE_VISITOR_ARGUMENT_H #define _BE_VISITOR_ARGUMENT_H @@ -25,9 +24,7 @@ #include "be_visitor_argument/arglist.h" #include "be_visitor_argument/vardecl_ss.h" #include "be_visitor_argument/upcall_ss.h" -#include "be_visitor_argument/post_upcall_ss.h" #include "be_visitor_argument/marshal_ss.h" #include "be_visitor_argument/invoke_cs.h" -#include "be_visitor_argument/paramlist.h" #endif /* _BE_VISITOR_ARGUMENT_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/paramlist.h b/TAO/TAO_IDL/be_include/be_visitor_argument/paramlist.h deleted file mode 100644 index a464bd08d7d..00000000000 --- a/TAO/TAO_IDL/be_include/be_visitor_argument/paramlist.h +++ /dev/null @@ -1,49 +0,0 @@ - -//============================================================================= -/** - * @file paramlist.h - * - * $Id$ - * - * Visitors for generation of code for building Dynamic::ParamList - * - * - * @author Kirthika Parameswaran <kirthika@cs.wustl.edu> - */ -//============================================================================= - - -#ifndef _BE_VISITOR_ARGUMENT_PARAMLIST_H_ -#define _BE_VISITOR_ARGUMENT_PARAMLIST_H_ - -/** - * @class be_visitor_args_paramlist - * - * @brief Generates the code for arguments output. - * - * At several stages in the code generation a node of type - * "be_operation" is visited, and the code for its arguments must - * be generated. Here the generationis to build the ParameterList - * on demand. - */ -class be_visitor_args_paramlist : public be_visitor_args -{ - -public: - /// constructor - be_visitor_args_paramlist (be_visitor_context *ctx); - - /// destructor - virtual ~be_visitor_args_paramlist (void); - - /// visit the argument node - virtual int visit_argument (be_argument *node); - - /// visit predefined types like boolean, char, octet, wchar. - virtual int visit_predefined_type (be_predefined_type *node); - - /// visit the string since insertion of string and w_string is special. - virtual int visit_string (be_string *node); -}; - -#endif /* _BE_VISITOR_ARGUMENT_PARAMLIST_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h deleted file mode 100644 index f1c5a7fcb0f..00000000000 --- a/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h +++ /dev/null @@ -1,54 +0,0 @@ - -//============================================================================= -/** - * @file post_upcall_ss.h - * - * $Id$ - * - * Visitors for generation of code for Arguments. This generates the - * code for post upcall processing of the arguments - * - * - * @author Aniruddha Gokhale - */ -//============================================================================= - - - -#ifndef _BE_VISITOR_ARGUMENT_POST_UPCALL_SS_H_ -#define _BE_VISITOR_ARGUMENT_POST_UPCALL_SS_H_ - -// ************************************************************ -// class be_visitor_args_post_upcall_ss -// ************************************************************ - -/** - * @class be_visitor_args_post_upcall_ss - * - * @brief be_visitor_compiled_args_post_upcall - * - * Visitor for post processing after upcall - */ -class be_visitor_args_post_upcall_ss : public be_visitor_scope -{ -public: - /// constructor - be_visitor_args_post_upcall_ss (be_visitor_context *ctx); - - /// destructor - virtual ~be_visitor_args_post_upcall_ss (void); - - /// visit the argument node - virtual int visit_argument (be_argument *node); - - /// visit operation node - virtual int visit_operation (be_operation *node); - - /// visit array type - virtual int visit_array (be_array *node); - - /// visit the typedef type - virtual int visit_typedef (be_typedef *node); -}; - -#endif /* _BE_VISITOR_ARGUMENT_POST_UPCALL_SS_H_ */ |