diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-08-27 20:39:00 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-08-27 20:39:00 +0000 |
commit | 5c70a04b17e19fdca8872a5753b04c506293932f (patch) | |
tree | b061402abd77864e65e9dccf3437fba242f2f4c2 | |
parent | 200552a5469161be6ad703660cabe35f6457967b (diff) | |
download | ATCD-5c70a04b17e19fdca8872a5753b04c506293932f.tar.gz |
ChangeLogTag: Wed Aug 27 15:34:16 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog_ref | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_attribute.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_interface.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation.cpp | 14 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp | 7 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp | 48 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp | 24 |
8 files changed, 40 insertions, 89 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref index 9863ada21ae..187c3f8de44 100644 --- a/TAO/ChangeLog_ref +++ b/TAO/ChangeLog_ref @@ -1,3 +1,15 @@ +Wed Aug 27 15:34:16 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/be/be_attribute.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_operation/operation.cpp: + * TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp: + * TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp: + * TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp: + * TAO_IDL/be/be_visitor_union_branch/public_ci.cpp: + + Fixed various errors in code generation caught by IDL_Test. + Tue Aug 26 17:44:56 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> * tao/Strategies/DIOP_Connector.cpp: diff --git a/TAO/TAO_IDL/be/be_attribute.cpp b/TAO/TAO_IDL/be/be_attribute.cpp index e94a5e951af..81f2ca2fb54 100644 --- a/TAO/TAO_IDL/be/be_attribute.cpp +++ b/TAO/TAO_IDL/be/be_attribute.cpp @@ -20,8 +20,11 @@ // ============================================================================ #include "be_attribute.h" +#include "be_type.h" #include "be_visitor.h" +#include "global_extern.h" + ACE_RCSID (be, be_attribute, "$Id$") @@ -73,6 +76,11 @@ be_attribute::be_attribute (idl_bool ro, ACE_NEW (bods, be_operation_default_strategy (0)); this->set_strategy_ = bods; + + // For the return types of the two operations generated from this attribute. + this->set_arg_seen_bit (be_type::narrow_from_decl (ft)); + ACE_SET_BITS (idl_global->decls_seen_info_, + idl_global->decls_seen_masks.basic_arg_seen_); } diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 52a06dac7b5..f47bf92b0f4 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -1204,7 +1204,7 @@ be_interface::gen_collocated_skel_body (be_interface *derived, << "ACE_INLINE void" << be_nl << (direct ? derived->full_direct_proxy_impl_name () : derived->full_thru_poa_proxy_impl_name ()) - << prefix << "::" << d->local_name () << " (" << be_idt << be_idt_nl + << "::" << prefix << d->local_name () << " (" << be_idt << be_idt_nl << "CORBA::Object_ptr obj, " << be_nl << "CORBA::Object_out obj_forward," << be_nl << "TAO::Argument ** args," << be_nl @@ -1218,7 +1218,7 @@ be_interface::gen_collocated_skel_body (be_interface *derived, << "{" << be_idt_nl << (direct ? ancestor->full_direct_proxy_impl_name () : ancestor->full_thru_poa_proxy_impl_name ()) - << "::" << d->local_name () << " (" << be_idt << be_idt_nl + << "::" << prefix << d->local_name () << " (" << be_idt << be_idt_nl << "obj," << be_nl << "obj_forward," << be_nl << "args," << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp index bed1ee33f8b..2189b01be77 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp @@ -689,16 +689,8 @@ be_visitor_operation::gen_arg_template_param_name (AST_Type *bt, { AST_Decl::NodeType nt = bt->node_type (); - if (nt == AST_Decl::NT_typedef) - { - be_typedef *td = be_typedef::narrow_from_decl (bt); - this->ctx_->alias (td); - this->gen_arg_template_param_name (td->primitive_base_type (), - os); - this->ctx_->alias (0); - return; - } - + // If we're here, we must have a bounded string, if unbounded, it + // would be a predefined type. if (nt == AST_Decl::NT_string) { AST_String *s = AST_String::narrow_from_decl (bt); @@ -712,6 +704,8 @@ be_visitor_operation::gen_arg_template_param_name (AST_Type *bt, } } + // For the four predefined types below, we use the helper struct + // type, in order to disambiguate the template parameter. if (nt == AST_Decl::NT_pre_defined) { AST_PredefinedType *pdt = AST_PredefinedType::narrow_from_decl (bt); diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp index 1fa719bef2d..83ae801ea37 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp @@ -837,13 +837,6 @@ be_visitor_sequence_cdr_op_cs::visit_node (be_type *bt) } else { - AST_Decl *parent = ScopeAsDecl (bt->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - *os << "TAO::Objref_Traits<" << bt->name () << ">::tao_marshal (" << be_idt << be_idt_nl << "_tao_sequence[i].in (), strm" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp index cbc097225c5..13a2b2c65a7 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp @@ -312,16 +312,8 @@ be_visitor_union_branch_cdr_op_ci::visit_interface (be_interface *node) } else { - *os << "result =" << be_idt_nl; - - AST_Decl *parent = ScopeAsDecl (node->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - - *os << "TAO::Objref_Traits<" << node->name () << ">::tao_marshal (" + *os << "result =" << be_idt_nl + << "TAO::Objref_Traits<" << node->name () << ">::tao_marshal (" << be_idt << be_idt_nl << "_tao_union." << f->local_name () << " ()," << be_nl << "strm" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp index c14ea3cf46f..82dd6eaeeb7 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_assign_cs.cpp @@ -259,16 +259,8 @@ be_visitor_union_branch_public_assign_cs::visit_interface (be_interface *node) } else { - *os << "OBJECT_FIELD (" << be_idt << be_idt_nl; - - AST_Decl *parent = ScopeAsDecl (node->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - - *os << "TAO::Objref_Traits<" << node->name () << ">::tao"; + *os << "OBJECT_FIELD (" << be_idt << be_idt_nl + << "TAO::Objref_Traits<" << node->name () << ">::tao"; } *os << "_duplicate (" << be_idt << be_idt_nl @@ -289,16 +281,8 @@ be_visitor_union_branch_public_assign_cs::visit_interface (be_interface *node) } else { - *os << "OBJECT_FIELD (" << be_idt << be_idt_nl; - - AST_Decl *parent = ScopeAsDecl (node->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - - *os << "TAO::Objref_Traits<" << node->name () << ">::tao"; + *os << "OBJECT_FIELD (" << be_idt << be_idt_nl + << "TAO::Objref_Traits<" << node->name () << ">::tao"; } *os << "_duplicate (" << be_idt << be_idt_nl @@ -372,16 +356,8 @@ be_visitor_union_branch_public_assign_cs::visit_interface_fwd ( } else { - *os << "OBJECT_FIELD (" << be_idt << be_idt_nl; - - AST_Decl *parent = ScopeAsDecl (node->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - - *os << "TAO::Objref_Traits<" << node->name () << ">::tao"; + *os << "OBJECT_FIELD (" << be_idt << be_idt_nl + << "TAO::Objref_Traits<" << node->name () << ">::tao"; } *os << "_duplicate (" << be_idt << be_idt_nl @@ -402,16 +378,8 @@ be_visitor_union_branch_public_assign_cs::visit_interface_fwd ( } else { - *os << "OBJECT_FIELD (" << be_idt << be_idt_nl; - - AST_Decl *parent = ScopeAsDecl (node->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - - *os << "TAO::Objref_Traits<" << node->name () << ">::tao"; + *os << "OBJECT_FIELD (" << be_idt << be_idt_nl + << "TAO::Objref_Traits<" << node->name () << ">::tao"; } *os << "_duplicate (" << be_idt << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp index 6889bec7ecf..65275984200 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp @@ -367,16 +367,8 @@ be_visitor_union_branch_public_ci::visit_interface (be_interface *node) } else { - *os << "OBJECT_FIELD (" << be_idt << be_idt_nl; - - AST_Decl *parent = ScopeAsDecl (node->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - - *os << "TAO::Objref_Traits<" << node->name () << ">::tao"; + *os << "OBJECT_FIELD (" << be_idt << be_idt_nl + << "TAO::Objref_Traits<" << node->name () << ">::tao"; } *os << "_duplicate (val)" << be_uidt_nl << ")" << be_uidt << be_uidt_nl @@ -472,16 +464,8 @@ be_visitor_union_branch_public_ci::visit_interface_fwd (be_interface_fwd *node) } else { - *os << "OBJECT_FIELD (" << be_idt << be_idt_nl; - - AST_Decl *parent = ScopeAsDecl (node->defined_in ()); - - if (parent != 0 && parent->node_type () != AST_Decl::NT_root) - { - *os << parent->name () << "::"; - } - - *os << "TAO::Objref_Traits<" << node->name () << ">::tao"; + *os << "OBJECT_FIELD (" << be_idt << be_idt_nl + << "TAO::Objref_Traits<" << node->name () << ">::tao"; } *os << "_duplicate (val)" << be_uidt_nl << ")" << be_uidt << be_uidt_nl |