From fd1e64ceda29edbdbcc8ed04a31f13479bb4e4fe Mon Sep 17 00:00:00 2001 From: parsons Date: Thu, 24 Apr 2003 18:57:54 +0000 Subject: ChangeLogTag: Thu Apr 24 13:52:44 2003 Jeff Parsons --- TAO/ChangeLog | 12 +++++ TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp | 14 +++--- TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp | 3 +- TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ci.cpp | 53 ++++++++++------------- TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp | 3 +- 5 files changed, 45 insertions(+), 40 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 8893a98bcda..f5e92fc86cd 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,15 @@ +Thu Apr 24 13:52:44 2003 Jeff Parsons + + * TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp: + * TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp: + * TAO_IDL/be/be_visitor_structure/cdr_op_ci.cpp: + * TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp: + + Reinstated code generation of CDR operators for structs that + contain a local interface. The operators are needed by the + Any operator template instantiation. The marshaling error + required for local interfaces is still output. + Thu Apr 24 13:01:12 2003 Jeff Parsons * TAO_IDL/be/be_type.cpp (gen_common_tmplinst): diff --git a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp index c5b18dda6de..687b4360fd0 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp @@ -282,9 +282,10 @@ be_visitor_field_cdr_op_ci::visit_interface (be_interface *node) case TAO_CodeGen::TAO_CDR_OUTPUT: if (node->is_defined ()) { - *os << "CORBA::Object::marshal (_tao_aggregate." - << f->local_name () - << ".in (),strm)" << be_nl; + *os << "CORBA::Object::marshal (" << be_idt << be_idt_nl + << "_tao_aggregate." << f->local_name () << ".in ()," << be_nl + << "strm" << be_uidt_nl + << ")" << be_uidt; } else { @@ -348,9 +349,10 @@ be_visitor_field_cdr_op_ci::visit_interface_fwd (be_interface_fwd *node) case TAO_CodeGen::TAO_CDR_OUTPUT: if (node->is_defined ()) { - *os << "CORBA::Object::marshal (_tao_aggregate." - << f->local_name () - << ".in (), strm)" << be_nl; + *os << "CORBA::Object::marshal (" << be_idt << be_idt_nl + << "_tao_aggregate." << f->local_name () << ".in ()," << be_nl + << "strm" << be_uidt_nl + << ")" << be_uidt; } else { diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp index 3aca186bbb9..cc883aae8a6 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ch.cpp @@ -42,8 +42,7 @@ int be_visitor_structure_cdr_op_ch::visit_structure (be_structure *node) { if (node->cli_hdr_cdr_op_gen () - || node->imported () - || node->is_local ()) + || node->imported ()) { return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ci.cpp index 5702ae974a9..87a5036bda0 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_ci.cpp @@ -43,8 +43,7 @@ be_visitor_structure_cdr_op_ci::visit_structure (be_structure *node) { // already generated and/or we are imported. Don't do anything. if (node->cli_inline_cdr_op_gen () - || node->imported () - || node->is_local ()) + || node->imported ()) { return 0; } @@ -84,7 +83,7 @@ be_visitor_structure_cdr_op_ci::visit_structure (be_structure *node) be_visitor_cdr_op_field_decl field_decl (&new_ctx); field_decl.visit_scope (node); - *os << "if (" << be_idt_nl; + *os << "return" << be_idt_nl; if (this->visit_scope (node) == -1) { @@ -95,14 +94,7 @@ be_visitor_structure_cdr_op_ci::visit_structure (be_structure *node) -1); } - *os << be_uidt_nl << " )"<< be_idt_nl - << "{" << be_idt_nl - << "return 1;" << be_uidt_nl - << "}" << be_uidt_nl - << "else" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt << be_uidt_nl + *os << ";" << be_uidt << be_uidt_nl << "}" << be_nl << be_nl; // Set the substate as generating code for the input operator. @@ -115,29 +107,30 @@ be_visitor_structure_cdr_op_ci::visit_structure (be_structure *node) << ")" << be_uidt_nl << "{" << be_idt_nl; - new_ctx.sub_state (TAO_CodeGen::TAO_CDR_INPUT); - field_decl.visit_scope (node); + if (node->is_local ()) + { + *os << "return 0;"; + } + else + { + new_ctx.sub_state (TAO_CodeGen::TAO_CDR_INPUT); + field_decl.visit_scope (node); - *os << "if (" << be_idt_nl; + *os << "return" << be_idt_nl; - if (this->visit_scope (node) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_structure_cdr_op_ci" - "::visit_structure - " - "codegen for scope failed\n"), - -1); + if (this->visit_scope (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_structure_cdr_op_ci" + "::visit_structure - " + "codegen for scope failed\n"), + -1); + } + + *os << ";" << be_uidt << be_uidt; } - *os << be_uidt_nl << " )" << be_idt_nl - << "{" << be_idt_nl - << "return 1;" << be_uidt_nl - << "}" << be_uidt_nl - << "else" << be_idt_nl - << "{" << be_idt_nl - << "return 0;" << be_uidt_nl - << "}" << be_uidt << be_uidt_nl - << "}"; + *os << be_uidt_nl << "}"; node->cli_inline_cdr_op_gen (1); return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp index 9ad013c1e88..647e0ad5155 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/cdr_op_cs.cpp @@ -37,8 +37,7 @@ int be_visitor_structure_cdr_op_cs::visit_structure (be_structure *node) { if (node->cli_stub_cdr_op_gen () - || node->imported () - || node->is_local ()) + || node->imported ()) { return 0; } -- cgit v1.2.1