summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2010-01-15 10:59:52 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2010-01-15 10:59:52 +0000
commit0cac85986644f145575ea55b9ca1a9826e6c8d13 (patch)
tree118d15b19dc09de4450b7b1eacf4b3399b43ea01 /TAO/TAO_IDL
parentce2ec85640b203ae68ad6fe65badcadd8f2c6974 (diff)
downloadATCD-0cac85986644f145575ea55b9ca1a9826e6c8d13.tar.gz
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_reifying.cpp63
1 files changed, 32 insertions, 31 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_reifying.cpp b/TAO/TAO_IDL/be/be_visitor_reifying.cpp
index e72bbfc251d..7d5c4ddda0f 100644
--- a/TAO/TAO_IDL/be/be_visitor_reifying.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_reifying.cpp
@@ -93,7 +93,7 @@ be_visitor_reifying::visit_array (be_array *node)
{
be_type *bt =
be_type::narrow_from_decl (node->base_type ());
-
+
if (bt->accept (this) != 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -102,18 +102,18 @@ be_visitor_reifying::visit_array (be_array *node)
ACE_TEXT ("visit of base type failed\n")),
-1);
}
-
+
bt = be_type::narrow_from_decl (this->reified_node_);
-
+
AST_Expression **dims = node->dims ();
AST_Expression *v = 0;
UTL_ExprList *v_list = 0;
-
+
for (ACE_CDR::ULong i = 0; i < node->n_dims (); ++i)
{
be_param_holder *ph =
be_param_holder::narrow_from_decl (dims[i]->param_holder ());
-
+
if (ph != 0)
{
if (this->visit_param_holder (ph) != 0)
@@ -125,10 +125,10 @@ be_visitor_reifying::visit_array (be_array *node)
ACE_TEXT ("failed\n")),
-1);
}
-
+
AST_Constant *c =
AST_Constant::narrow_from_decl (this->reified_node_);
-
+
ACE_NEW_RETURN (v,
AST_Expression (c->constant_value (),
AST_Expression::EV_ulong),
@@ -141,12 +141,12 @@ be_visitor_reifying::visit_array (be_array *node)
AST_Expression::EV_ulong),
-1);
}
-
+
UTL_ExprList *el = 0;
ACE_NEW_RETURN (el,
UTL_ExprList (v, 0),
-1);
-
+
if (v_list == 0)
{
v_list = el;
@@ -156,12 +156,12 @@ be_visitor_reifying::visit_array (be_array *node)
v_list->nconc (el);
}
}
-
+
UTL_ScopedName sn (node->name ()->last_component ()->copy (),
0);
-
+
be_array *arr = 0;
-
+
ACE_NEW_RETURN (arr,
be_array (&sn,
node->n_dims (),
@@ -169,15 +169,15 @@ be_visitor_reifying::visit_array (be_array *node)
false,
false),
-1);
-
+
sn.destroy ();
v_list->destroy ();
delete v_list;
v_list = 0;
-
+
arr->set_base_type (bt);
this->reified_node_ = arr;
-
+
return 0;
}
@@ -186,7 +186,7 @@ be_visitor_reifying::visit_sequence (be_sequence *node)
{
be_type *bt =
be_type::narrow_from_decl (node->base_type ());
-
+
if (bt->accept (this) != 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
@@ -195,13 +195,13 @@ be_visitor_reifying::visit_sequence (be_sequence *node)
ACE_TEXT ("visit of base type failed\n")),
-1);
}
-
+
bt = be_type::narrow_from_decl (this->reified_node_);
-
+
AST_Expression *v = node->max_size ();
be_param_holder *ph =
be_param_holder::narrow_from_decl (v->param_holder ());
-
+
if (ph != 0)
{
if (this->visit_param_holder (ph) != 0)
@@ -213,19 +213,19 @@ be_visitor_reifying::visit_sequence (be_sequence *node)
ACE_TEXT ("failed\n")),
-1);
}
-
+
AST_Constant *c =
AST_Constant::narrow_from_decl (this->reified_node_);
-
+
v = c->constant_value ();
}
-
+
AST_Expression *bound = 0;
ACE_NEW_RETURN (bound,
AST_Expression (v,
AST_Expression::EV_ulong),
-1);
-
+
Identifier id ("sequence");
UTL_ScopedName sn (&id, 0);
@@ -276,16 +276,16 @@ be_visitor_reifying::visit_param_holder (be_param_holder *node)
{
FE_Utils::T_Param_Info *item = 0;
iter.next (item);
-
+
if (item == node->info ())
{
AST_Decl **ret_ptr = 0;
-
+
if (t_args->get (ret_ptr, i) == 0)
{
be_decl *candidate =
be_decl::narrow_from_decl (*ret_ptr);
-
+
return candidate->accept (this);
}
else
@@ -302,7 +302,7 @@ be_visitor_reifying::visit_param_holder (be_param_holder *node)
}
}
}
-
+
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("be_visitor_reifying::")
ACE_TEXT ("visit_param_holder() - no match for ")
@@ -316,16 +316,17 @@ bool
be_visitor_reifying::declared_in_template_module (AST_Decl *d)
{
AST_Decl *tmp = d;
-
+
while (tmp != 0)
{
if (AST_Template_Module::narrow_from_decl (tmp) != 0)
{
return true;
}
-
+
tmp = ScopeAsDecl (tmp->defined_in ());
}
-
+
return false;
-} \ No newline at end of file
+}
+