summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-28 17:19:59 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-28 17:19:59 +0000
commitc668b0fcfde3e233739450404248c73885b3a53c (patch)
tree9dc9f6793dc21d59cd13e20a3886506a7f4aadc0
parentdf6d9e1e2ae3b465730c93a68f595930c28532ef (diff)
downloadATCD-c668b0fcfde3e233739450404248c73885b3a53c.tar.gz
ChangeLogTag: Thu Aug 28 12:16:16 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog_ref8
-rw-r--r--TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp1
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp50
-rw-r--r--TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp7
4 files changed, 23 insertions, 43 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref
index 3414c8a1174..e7af4226e65 100644
--- a/TAO/ChangeLog_ref
+++ b/TAO/ChangeLog_ref
@@ -1,3 +1,11 @@
+Thu Aug 28 12:16:16 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_ami_pre_proc.cpp:
+ * TAO_IDL/be/be_visitor_operation/ami_cs.cpp:
+ * TAO_IDL/be/be_visitor_valuetype/obv_module.cpp:
+
+ Fixed code generation bugs related to AMI.
+
Thu Aug 28 11:42:46 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_interface.cpp:
diff --git a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
index 6d5e500ced9..6ef37c1a4fe 100644
--- a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp
@@ -409,6 +409,7 @@ be_visitor_ami_pre_proc::create_exception_holder (be_interface *node)
0);
excep_holder->set_name (excep_holder_name);
+ excep_holder->seen_in_operation (I_TRUE);
// Now our customized valuetype is created, we have to
// add now the operations and attributes to the scope.
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
index 1fd75978776..df7efd3d15c 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
@@ -177,43 +177,36 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
<< "this->ACE_NESTED_CLASS (CORBA, Object)::_is_collocated ()"
<< be_uidt_nl
<< ");" << be_uidt << be_uidt_nl
- << "}" << be_uidt_nl;
+ << "}" << be_uidt;
}
const char *lname = node->local_name ()->get_string ();
long opname_len = ACE_OS::strlen (lname);
ACE_CString opname;
int nargs = node->argument_count ();
- idl_bool add_retval = I_FALSE;
- idl_bool add_comma = I_FALSE;
+
+ *os << be_nl<< be_nl
+ << "TAO::Arg_Traits<";
+
+ this->gen_arg_template_param_name (bt,
+ os);
+
+ *os << ">::ret_val _tao_retval;";
// Check if we are an attribute node in disguise.
if (this->ctx_->attribute ())
{
// Declare return type helper class.
- *os << be_nl
- << "TAO::Arg_Traits<";
-
- this->gen_arg_template_param_name (bt,
- os);
-
- *os << ">::ret_val _tao_retval;";
-
// If we are a attribute node, add the length of the operation
// name.
opname_len += 5;
// Count the return value.
- nargs++;
-
- add_retval = I_TRUE;
-
// Now check if we are a "get" or "set" operation.
if (node->nmembers () == 1)
{
opname = "_set_";
- add_comma = I_TRUE;
}
else
{
@@ -228,21 +221,10 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
*os << be_nl << be_nl
<< "TAO::Argument *_tao_signature [] =" << be_idt_nl
- << "{" << be_idt;
-
- if (add_retval)
- {
- *os << be_nl
- << "&_tao_retval";
- }
-
- if (add_comma)
- {
- *os << ",";
- }
+ << "{" << be_idt_nl
+ << "&_tao_retval";
AST_Argument *arg = 0;
- int args_left = node->argument_count ();
for (UTL_ScopeActiveIterator arg_list_iter (node, UTL_Scope::IK_decls);
! arg_list_iter.is_done ();
@@ -253,17 +235,11 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
if (arg->direction () == AST_Argument::dir_OUT)
{
nargs--;
- args_left--;
continue;
}
- *os << be_nl
+ *os << "," << be_nl
<< "&_tao_" << arg->local_name ();
-
- if (--args_left)
- {
- *os << ",";
- }
}
*os << be_uidt_nl
@@ -275,7 +251,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
<< "TAO::Asynch_Invocation_Adapter _tao_call (" << be_idt << be_idt_nl
<< "this," << be_nl
<< "_tao_signature," << be_nl
- << nargs << "," << be_nl
+ << nargs + 1 << "," << be_nl
<< "\"" << opname.fast_rep () << "\"," << be_nl
<< opname_len << "," << be_nl
<< "this->the" << intf->base_proxy_broker_name () << "_"
diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp
index a672665094a..87571fa8cba 100644
--- a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp
@@ -81,10 +81,7 @@ be_visitor_obv_module::visit_module (be_module *node)
if (this->ctx_->state () == TAO_CodeGen::TAO_MODULE_OBV_CH)
{
- *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl
- << "// " << __FILE__ << ":" << __LINE__;
-
- *os << be_uidt_nl << be_nl << "}";
+ *os << be_uidt_nl << "}";
}
}
@@ -204,8 +201,6 @@ be_visitor_obv_module::visit_eventtype (be_eventtype *node)
break;
case TAO_CodeGen::TAO_MODULE_OBV_CI:
{
- // This context state is not involved in any strategies.
-// ctx.state (TAO_CodeGen::TAO_EVENTTYPE_OBV_CI);
be_visitor_eventtype_obv_ci visitor (&ctx);
status = node->accept (&visitor);
break;