summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-14 18:17:40 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-12-14 18:17:40 +0000
commit5748f8f05b1ea9c077df9f0f3201fa7d9ec614e0 (patch)
tree8f6911b28f91a3232573d27431ec9188cc3be607
parent94b3b86eaf22120d8b303eff440b6a7358384dc9 (diff)
downloadATCD-5748f8f05b1ea9c077df9f0f3201fa7d9ec614e0.tar.gz
ChangeLogTag: Mon Dec 14 18:16:17 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--modules/TAO/ChangeLog7
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_array.cpp11
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_expression.cpp16
3 files changed, 23 insertions, 11 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog
index 608fcb9be03..82e0cf26f18 100644
--- a/modules/TAO/ChangeLog
+++ b/modules/TAO/ChangeLog
@@ -1,3 +1,10 @@
+Mon Dec 14 18:16:17 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/ast/ast_expression.cpp:
+ * TAO_IDL/ast/ast_array.cpp:
+
+ Completed support for template parameters as array bounds.
+
Fri Dec 11 19:17:52 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/ast/ast_sequence.cpp:
diff --git a/modules/TAO/TAO_IDL/ast/ast_array.cpp b/modules/TAO/TAO_IDL/ast/ast_array.cpp
index a7dcbf126c9..a474333473b 100644
--- a/modules/TAO/TAO_IDL/ast/ast_array.cpp
+++ b/modules/TAO/TAO_IDL/ast/ast_array.cpp
@@ -150,16 +150,12 @@ AST_Array::compute_dims (UTL_ExprList *ds,
AST_Expression::ExprType ex_type =
(ph == 0 ? orig->ev ()->et : ph->info ()->const_type_);
-// ==================
-// TODO - still fails because of coercion in the constructor
-// of 'copy'
AST_Expression *copy = 0;
ACE_NEW_RETURN (copy,
AST_Expression (orig,
ex_type),
0);
-// ================
-
+
result[i] = copy;
}
@@ -239,10 +235,11 @@ void
AST_Array::set_base_type (AST_Type *nbt)
{
this->pd_base_type = nbt;
-
this->is_local_ = nbt->is_local ();
+ AST_Decl::NodeType bnt = nbt->node_type ();
- if (AST_Decl::NT_sequence == nbt->node_type ())
+ if (bnt == AST_Decl::NT_sequence
+ || bnt == AST_Decl::NT_param_holder)
{
this->owns_base_type_ = true;
}
diff --git a/modules/TAO/TAO_IDL/ast/ast_expression.cpp b/modules/TAO/TAO_IDL/ast/ast_expression.cpp
index 1bcf63a87a6..0ad50a1d3a1 100644
--- a/modules/TAO/TAO_IDL/ast/ast_expression.cpp
+++ b/modules/TAO/TAO_IDL/ast/ast_expression.cpp
@@ -128,6 +128,7 @@ AST_Expression::AST_Expression (AST_Expression *v,
tdef (0),
param_holder_ (0)
{
+ AST_Param_Holder *ph = v->param_holder_;
this->fill_definition_details ();
// If we are here because one string constant has
@@ -153,12 +154,19 @@ AST_Expression::AST_Expression (AST_Expression *v,
}
else
{
- this->pd_ev = v->coerce (t);
+ if (ph == 0)
+ {
+ this->pd_ev = v->coerce (t);
- if (this->pd_ev == 0)
+ if (this->pd_ev == 0)
+ {
+ idl_global->err ()->coercion_error (v, t);
+ }
+ }
+ else
{
- idl_global->err ()->coercion_error (v,
- t);
+ this->param_holder_ = ph;
+ v->param_holder_ = 0;
}
if (0 != v->pd_n)