diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-09-29 13:37:07 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-09-29 13:37:07 +0000 |
commit | 58acb7dd109b11f500fc3da505ab619c237f34df (patch) | |
tree | 29499a5a12f948ffd6672f3eb579904c0b6b4308 /TAO/TAO_IDL/be | |
parent | f808d7f1b305260684135983a8f1440283427c56 (diff) | |
download | ATCD-58acb7dd109b11f500fc3da505ab619c237f34df.tar.gz |
ChangeLogTag: Mon Sep 29 13:35:43 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL/be')
-rw-r--r-- | TAO/TAO_IDL/be/be_array.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_enum_val.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_expression.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_generator.cpp | 14 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_helper.cpp | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_string.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_arg_traits.cpp | 12 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_array/serializer_op_cs.cpp | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/operation.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp | 8 |
14 files changed, 48 insertions, 39 deletions
diff --git a/TAO/TAO_IDL/be/be_array.cpp b/TAO/TAO_IDL/be/be_array.cpp index 99d26b4b99c..ec16b8ebb0e 100644 --- a/TAO/TAO_IDL/be/be_array.cpp +++ b/TAO/TAO_IDL/be/be_array.cpp @@ -279,8 +279,8 @@ be_array::gen_ostream_operator (TAO_OutStream *os) << "{" << be_idt_nl << "strm << \"" << this->name () << "\";" << be_nl << be_nl; - unsigned long ndims = this->n_dims (); - unsigned long i = 0; + ACE_CDR::ULong ndims = this->n_dims (); + ACE_CDR::ULong i = 0; for (i = 0; i < ndims; ++i) { diff --git a/TAO/TAO_IDL/be/be_enum_val.cpp b/TAO/TAO_IDL/be/be_enum_val.cpp index 6c3198b848f..5b12ac2721e 100644 --- a/TAO/TAO_IDL/be/be_enum_val.cpp +++ b/TAO/TAO_IDL/be/be_enum_val.cpp @@ -35,7 +35,7 @@ be_enum_val::be_enum_val (void) { } -be_enum_val::be_enum_val (unsigned long v, +be_enum_val::be_enum_val (ACE_CDR::ULong v, UTL_ScopedName *n) : COMMON_Base (), AST_Decl (AST_Decl::NT_enum_val, diff --git a/TAO/TAO_IDL/be/be_expression.cpp b/TAO/TAO_IDL/be/be_expression.cpp index 40da1b84eea..815568daaf0 100644 --- a/TAO/TAO_IDL/be/be_expression.cpp +++ b/TAO/TAO_IDL/be/be_expression.cpp @@ -46,17 +46,17 @@ be_expression::be_expression (AST_Expression::ExprComb c, { } -be_expression::be_expression (long l) +be_expression::be_expression (ACE_CDR::Long l) : AST_Expression (l) { } -be_expression::be_expression (bool b) +be_expression::be_expression (ACE_CDR::Boolean b) : AST_Expression (b) { } -be_expression::be_expression (idl_uns_long l, +be_expression::be_expression (ACE_CDR::ULong l, AST_Expression::ExprType t) : AST_Expression (l, t) @@ -73,7 +73,7 @@ be_expression::be_expression (char *s) { } -be_expression::be_expression (char c) +be_expression::be_expression (ACE_CDR::Char c) : AST_Expression (c) { } @@ -83,7 +83,7 @@ be_expression::be_expression (ACE_OutputCDR::from_wchar wc) { } -be_expression::be_expression (double d) +be_expression::be_expression (ACE_CDR::Double d) : AST_Expression (d) { } diff --git a/TAO/TAO_IDL/be/be_generator.cpp b/TAO/TAO_IDL/be/be_generator.cpp index 49dfc20a7ce..cc5e1297b0d 100644 --- a/TAO/TAO_IDL/be/be_generator.cpp +++ b/TAO/TAO_IDL/be/be_generator.cpp @@ -692,7 +692,7 @@ be_generator::create_expr (AST_Expression::ExprComb c, } AST_Expression * -be_generator::create_expr (long l) +be_generator::create_expr (ACE_CDR::Long l) { be_expression *retval = 0; ACE_NEW_RETURN (retval, @@ -703,7 +703,7 @@ be_generator::create_expr (long l) } AST_Expression * -be_generator::create_expr (bool b) +be_generator::create_expr (ACE_CDR::Boolean b) { be_expression *retval = 0; ACE_NEW_RETURN (retval, @@ -714,7 +714,7 @@ be_generator::create_expr (bool b) } AST_Expression * -be_generator::create_expr (idl_uns_long l, +be_generator::create_expr (ACE_CDR::ULong l, AST_Expression::ExprType t) { be_expression *retval = 0; @@ -738,7 +738,7 @@ be_generator::create_expr (UTL_String *s) } AST_Expression * -be_generator::create_expr(char c) +be_generator::create_expr (ACE_CDR::Char c) { be_expression *retval = 0; ACE_NEW_RETURN (retval, @@ -771,7 +771,7 @@ be_generator::create_expr (char *s) } AST_Expression * -be_generator::create_expr (double d) +be_generator::create_expr (ACE_CDR::Double d) { be_expression *retval = 0; ACE_NEW_RETURN (retval, @@ -782,7 +782,7 @@ be_generator::create_expr (double d) } AST_EnumVal * -be_generator::create_enum_val (unsigned long v, +be_generator::create_enum_val (ACE_CDR::ULong v, UTL_ScopedName *n) { be_enum_val *retval = 0; @@ -796,7 +796,7 @@ be_generator::create_enum_val (unsigned long v, AST_Array * be_generator::create_array (UTL_ScopedName *n, - unsigned long ndims, + ACE_CDR::ULong ndims, UTL_ExprList *dims, bool is_local, bool is_abstract) diff --git a/TAO/TAO_IDL/be/be_helper.cpp b/TAO/TAO_IDL/be/be_helper.cpp index 67dff23c38e..a701721f3dd 100644 --- a/TAO/TAO_IDL/be/be_helper.cpp +++ b/TAO/TAO_IDL/be/be_helper.cpp @@ -381,6 +381,7 @@ TAO_OutStream::operator<< (const ACE_CDR::LongLong num) return *this; } #endif +/* TAO_OutStream & TAO_OutStream::operator<< (const unsigned long num) { @@ -400,7 +401,7 @@ TAO_OutStream::operator<< (const long num) return *this; } - +*/ TAO_OutStream & TAO_OutStream::operator<< (const TAO_NL&) { diff --git a/TAO/TAO_IDL/be/be_string.cpp b/TAO/TAO_IDL/be/be_string.cpp index 53f8ca12831..ba39be49456 100644 --- a/TAO/TAO_IDL/be/be_string.cpp +++ b/TAO/TAO_IDL/be/be_string.cpp @@ -106,8 +106,8 @@ void be_string::compute_tc_name (void) { Identifier * id = 0; - - AST_Expression zero (static_cast<unsigned long> (0)); + ACE_CDR::ULong val = 0UL; + AST_Expression zero (val); if (*this->max_size () == &zero) { diff --git a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp index 4201a429005..31e79c7d532 100644 --- a/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_arg_traits.cpp @@ -389,7 +389,7 @@ be_visitor_arg_traits::visit_operation (be_operation *node) if (nt == AST_Decl::NT_string || nt == AST_Decl::NT_wstring) { AST_String *str = AST_String::narrow_from_decl (rt); - unsigned long bound = str->max_size ()->ev ()->u.ulval; + ACE_CDR::ULong bound = str->max_size ()->ev ()->u.ulval; if (bound > 0) { @@ -464,7 +464,7 @@ be_visitor_arg_traits::visit_attribute (be_attribute *node) return 0; } - unsigned long bound = st->max_size ()->ev ()->u.ulval; + ACE_CDR::ULong bound = st->max_size ()->ev ()->u.ulval; if (bound == 0) { @@ -541,7 +541,7 @@ be_visitor_arg_traits::visit_argument (be_argument *node) } be_string *st = be_string::narrow_from_decl (bt); - unsigned long bound = st->max_size ()->ev ()->u.ulval; + ACE_CDR::ULong bound = st->max_size ()->ev ()->u.ulval; if (bound == 0) { @@ -654,7 +654,7 @@ be_visitor_arg_traits::visit_string (be_string *node) return 0; } - unsigned long bound = node->max_size ()->ev ()->u.ulval; + ACE_CDR::ULong bound = node->max_size ()->ev ()->u.ulval; be_type *alias = this->ctx_->alias (); // Unbounded (w)string args are handled as a predefined type. @@ -682,13 +682,15 @@ be_visitor_arg_traits::visit_string (be_string *node) else { // Form a unique macro name using the local name and the bound. - unsigned long l = bound; + ACE_CDR::ULong l = bound; int num_digits = 0; + while (l > 0) { l /= 10 ; ++num_digits ; } + size_t bound_length = num_digits + 1; char* bound_string = 0; ACE_NEW_RETURN (bound_string, char[bound_length], -1) ; diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp index 3fd6280cded..97b8114524c 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ci.cpp @@ -174,9 +174,9 @@ int be_visitor_array_ci::visit_array (be_array *node) } char buf[NAMEBUFSIZE]; - unsigned long i; + ACE_CDR::ULong i; - for (i = 0; i < node->n_dims (); ++i) + for (i = 0UL; i < node->n_dims (); ++i) { ACE_OS::memset (buf, '\0', @@ -232,7 +232,7 @@ int be_visitor_array_ci::visit_array (be_array *node) << ")" << be_uidt_nl << "{" << be_idt_nl; - unsigned long ndims = node->n_dims (); + ACE_CDR::ULong ndims = node->n_dims (); be_array *primitive_type = 0; if (bt->node_type () == AST_Decl::NT_typedef) diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp index 516546a2e38..dea201550cd 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_cs.cpp @@ -44,7 +44,7 @@ int be_visitor_array_cs::visit_array (be_array *node) } TAO_OutStream *os = this->ctx_->stream (); - unsigned long i; + ACE_CDR::ULong i; this->ctx_->node (node); // Retrieve the type. @@ -171,7 +171,7 @@ int be_visitor_array_cs::visit_array (be_array *node) *os << "{" << be_idt_nl; *os << "// Copy each individual element." << be_nl; - unsigned long ndims = node->n_dims (); + ACE_CDR::ULong ndims = node->n_dims (); // Generate nested loops for as many dimensions as there are. for (i = 0; i < ndims; ++i) diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp index b6e5898377e..c2c22c3f2cc 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp @@ -564,7 +564,7 @@ int be_visitor_array_cdr_op_cs::visit_node (be_type *bt) { TAO_OutStream *os = this->ctx_->stream (); - unsigned long i; + ACE_CDR::ULong i; be_array *node = this->ctx_->be_node_as_array (); AST_Decl::NodeType nt = bt->node_type (); @@ -580,7 +580,7 @@ be_visitor_array_cdr_op_cs::visit_node (be_type *bt) // Initialize a boolean variable. *os << "CORBA::Boolean _tao_marshal_flag = true;" << be_nl; - unsigned long ndims = node->n_dims (); + ACE_CDR::ULong ndims = node->n_dims (); // We get here if the "type" of individual elements of the array is not a // primitive type. In this case, we are left with no other alternative but to diff --git a/TAO/TAO_IDL/be/be_visitor_array/serializer_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/serializer_op_cs.cpp index 9fff70e75a4..33f5f84f7c2 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/serializer_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/serializer_op_cs.cpp @@ -752,7 +752,7 @@ int be_visitor_array_serializer_op_cs::visit_node (be_type *bt) { TAO_OutStream *os = this->ctx_->stream (); - unsigned long i; + ACE_CDR::ULong i; be_array *node = this->ctx_->be_node_as_array (); AST_Decl::NodeType nt = bt->node_type (); @@ -925,7 +925,7 @@ be_visitor_array_serializer_op_cs::visit_node (be_type *bt) *os << "::CORBA::Boolean _tao_marshal_flag = true;" << be_nl; } - unsigned long ndims = node->n_dims (); + ACE_CDR::ULong ndims = node->n_dims (); // We get here if the "type" of individual elements of the array is not a // primitive type. In this case, we are left with no other alternative but to @@ -954,7 +954,9 @@ be_visitor_array_serializer_op_cs::visit_node (be_type *bt) << expr->ev ()->u.ulval; if (TAO_CodeGen::TAO_FIND_SIZE != this->ctx_->sub_state ()) + { *os << " && _tao_marshal_flag"; + } *os << "; i" << i << "++)" << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index dd51b967585..765eae17379 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -182,10 +182,12 @@ be_visitor_interface_ss::visit_interface (be_interface *node) node->is_local (), node->is_abstract ()); is_a.set_defined_in (node); + + ACE_CDR::ULong bound = 0UL; auto_ptr<AST_String> s ( idl_global->gen ()->create_string ( - idl_global->gen ()->create_expr ((idl_uns_long) 0, + idl_global->gen ()->create_expr (bound, AST_Expression::EV_ulong))); Identifier arg_name ("repository_id"); @@ -395,10 +397,12 @@ be_visitor_interface_ss::visit_interface (be_interface *node) if (!be_global->gen_minimum_corba ()) { + ACE_CDR::ULong bound = 0UL; + // Generate code for the _repository_id skeleton. auto_ptr<AST_String> s ( idl_global->gen ()->create_string ( - idl_global->gen ()->create_expr ((idl_uns_long) 0, + idl_global->gen ()->create_expr (bound, AST_Expression::EV_ulong))); // @@ Cheat a little by placing a space before the operation name diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp index 46bf569e49f..9f7c14c9025 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp @@ -456,7 +456,7 @@ be_visitor_operation::gen_arg_template_param_name (AST_Decl *scope, if (nt == AST_Decl::NT_string || nt == AST_Decl::NT_wstring) { AST_String *s = AST_String::narrow_from_decl (bt->unaliased_type ()); - unsigned long bound = s->max_size ()->ev ()->u.ulval; + ACE_CDR::ULong bound = s->max_size ()->ev ()->u.ulval; // If the (w)string is unbounded, code is generated below by the // last line of this method, whether bt is a typedef or not. diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp index d2ed9a8e3ff..a456530ad0a 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -391,18 +391,18 @@ be_visitor_typecode_defn::visit_array (be_array *node) // Namespace begin. this->gen_begin_NS_for_anon (); - unsigned long const ndims = node->n_dims (); + ACE_CDR::ULong const ndims = node->n_dims (); - for (unsigned long i = 0; i < ndims; ++i) + for (ACE_CDR::ULong i = 0; i < ndims; ++i) { os << "TAO::TypeCode::Sequence< ::CORBA::TypeCode_ptr const *," << be_nl << " TAO::Null_RefCount_Policy>" << be_idt_nl << node->flat_name (); - unsigned long const inner_ndims = ndims - i - 1; + ACE_CDR::ULong const inner_ndims = ndims - i - 1; - for (unsigned long j = inner_ndims; j < ndims; ++j) + for (ACE_CDR::ULong j = inner_ndims; j < ndims; ++j) { os << "_" << node->dims ()[j]->ev ()->u.ulval; } |