summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-04-28 01:52:21 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-04-28 01:52:21 +0000
commit89910693b870fa5ea7106969a89a2a23bc008ffd (patch)
tree7a475d423d5c79a2eaf70b50668786c99c23aa61 /TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
parentd953d42c093add0ffcbdd42422809a0cecd82c3d (diff)
downloadATCD-89910693b870fa5ea7106969a89a2a23bc008ffd.tar.gz
ChangeLogTag: Wed Apr 28 01:51:18 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_interface/interface.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_interface/interface.cpp82
1 files changed, 19 insertions, 63 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
index 792a45fec05..99b73167f7f 100644
--- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp
@@ -202,7 +202,7 @@ be_visitor_interface::visit_constant (be_constant *node)
break;
}
default:
- return 0; // nothing to be done
+ return 0; // nothing to be done
}
if (status == -1)
@@ -398,10 +398,26 @@ be_visitor_interface::visit_operation (be_operation *node)
// These first two cases may have the context state changed
// by a strategy, so we use the visitor factory below.
case TAO_CodeGen::TAO_INTERFACE_CH:
- ctx.state (TAO_CodeGen::TAO_OPERATION_CH);
- break;
+ {
+ ctx.state (TAO_CodeGen::TAO_OPERATION_CH);
+ be_visitor_operation_ch visitor (&ctx);
+ status = node->accept (&visitor);
+ break;
+ }
case TAO_CodeGen::TAO_ROOT_CS:
ctx.state (TAO_CodeGen::TAO_OPERATION_CS);
+
+ if (node->is_sendc_ami ())
+ {
+ be_visitor_operation_ami_cs visitor (&ctx);
+ status = node->accept (&visitor);
+ }
+ else
+ {
+ be_visitor_operation_cs visitor (&ctx);
+ status = node->accept (&visitor);
+ }
+
break;
case TAO_CodeGen::TAO_ROOT_SH:
{
@@ -506,66 +522,6 @@ be_visitor_interface::visit_operation (be_operation *node)
-1);
}
- // Change the state depending on the kind of node strategy.
- ctx.state (node->next_state (ctx.state ()));
-
- // Grab the appropriate visitor.
- be_visitor *visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_operation - "
- "NUL visitor\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_operation - "
- "failed to accept visitor\n"),
- -1);
- }
-
- delete visitor;
- visitor = 0;
-
- // Do additional code generation is necessary.
- // Note, this call is delegated to the strategy connected to
- // the node.
- if (node->has_extra_code_generation (ctx.state ()))
- {
- // Change the state depending on the kind of node strategy.
- ctx.state (node->next_state (ctx.state (), 1));
-
- // Grab the appropriate visitor.
- visitor = tao_cg->make_visitor (&ctx);
-
- if (!visitor)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_operation - "
- "NUL visitor\n"),
- -1);
- }
-
- if (node->accept (visitor) == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%N:%l) be_visitor_interface::"
- "visit_operation - "
- "failed to accept visitor\n"),
- -1);
- }
-
- delete visitor;
- visitor = 0;
- }
-
return 0;
}