summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1999-01-06 19:17:56 +0000
committergokhale <asgokhale@users.noreply.github.com>1999-01-06 19:17:56 +0000
commitbf5dfad11cfb890567872e178c3d649987041ead (patch)
tree85b4d2c084f8afceffc1a19c1337ac5627bce44b
parentbdd23e3c4f64ce346a7856d16a1f29ae74a2a9ef (diff)
downloadATCD-bf5dfad11cfb890567872e178c3d649987041ead.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c34
-rw-r--r--TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp29
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp7
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp1
-rw-r--r--TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp4
5 files changed, 65 insertions, 10 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 2e8a19ecdbd..d118047fb31 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,37 @@
+Wed Jan 6 14:05:21 EST 1999 Aniruddha Gokhale <gokhale@sahyadri.research.bell-labs.com>
+
+ * TAO_IDL/be/be_visitor_array/array_ch.cpp:
+
+ g++ was issuing warnings for the helper methods defined for
+ arrays (e.g., _alloc, _dup, _copy, _free). These warnings
+ appeared only when the helper methods were in the outermost
+ global scope because they were defined static and the compiler
+ could not find their implementation. Thus, we now do not
+ generate the "static" keyword for these helpers if they are in
+ the outermost scope. However, this change made Sun C++ compiler
+ unhappy since it did not like the _free and _alloc in the inline
+ file (*.i) and their forward declarations did not have the
+ inline word. So now also generate the ACE_INLINE macro for the
+ _free and _alloc methods if they are in the outermost scope. Now
+ both compilers are happy. Hopefully others are too.
+
+ * TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp:
+ TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp:
+
+ The var and out implementation was not guarded by the #if
+ !defined conditionla. As a result, there were instances when we
+ could get multiple definitions. Thanks to Virginie Amar
+ <vamar@amadeus.net> for submitting the bugreport.
+
+ We had also forgotten to set the "is_generated" flag to true
+ once we had generated code for the sequence node.
+
+ * TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp:
+
+ Since we now use the TAO_Object_Field_T<T> for object reference
+ members of union, we couldn't call CORBA::release in the "reset"
+ method. We now simply call "delete".
+
Wed Jan 06 11:55:25 1999 Nanbor Wang <nanbor@cs.wustl.edu>
* examples/Simple/echo/Client_i.cpp (echo_list): Changed <l> to of
diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp
index 69f262e0d4d..754d5106682 100644
--- a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp
@@ -193,30 +193,46 @@ int be_visitor_array_ch::visit_array (be_array *node)
os->indent ();
char *storage_class = 0;
- if (scope->node_type () != AST_Decl::NT_module)
- storage_class = "static ";
+ if (node->is_nested ())
+ {
+ if (scope->node_type () != AST_Decl::NT_module)
+ storage_class = "static ";
+ else
+ storage_class = "TAO_NAMESPACE_STORAGE_CLASS ";
+ }
else
- storage_class = "TAO_NAMESPACE_STORAGE_CLASS ";
+ storage_class = "";
if (this->ctx_->tdef ())
{
// typedefed array
+ if (!node->is_nested ())
+ *os << "ACE_INLINE ";
*os << storage_class << node->nested_type_name (scope, "_slice") << " *";
*os << node->nested_type_name (scope, "_alloc") << " (void);" << be_nl;
+ if (!node->is_nested ())
+ *os << "ACE_INLINE ";
+ *os << storage_class << "void " << node->nested_type_name (scope, "_free") << " (";
+ *os << node->nested_type_name (scope, "_slice") << " *_tao_slice);" << be_nl;
*os << storage_class << node->nested_type_name (scope, "_slice") << " *";
*os << node->nested_type_name (scope, "_dup") << " (const ";
*os << node->nested_type_name (scope, "_slice") << " *_tao_slice);" << be_nl;
*os << storage_class << "void " << node->nested_type_name (scope, "_copy") << " (";
*os << node->nested_type_name (scope, "_slice") << " *_tao_to, const ";
*os << node->nested_type_name (scope, "_slice") << " *_tao_from);" << be_nl;
- *os << storage_class << "void " << node->nested_type_name (scope, "_free") << " (";
- *os << node->nested_type_name (scope, "_slice") << " *_tao_slice);" << be_nl;
}
else
{
// anonymous array
+ if (!node->is_nested ())
+ *os << "ACE_INLINE ";
*os << storage_class << node->nested_type_name (scope, "_slice", "_") << " *";
*os << node->nested_type_name (scope, "_alloc", "_") << " (void);" << be_nl;
+ if (!node->is_nested ())
+ *os << "ACE_INLINE ";
+ *os << storage_class << "void "
+ << node->nested_type_name (scope, "_free", "_") << " (";
+ *os << node->nested_type_name (scope, "_slice", "_") << " *_tao_slice);" << be_nl;
*os << storage_class << node->nested_type_name (scope, "_slice", "_") << " *";
*os << node->nested_type_name (scope, "_dup", "_") << " (const ";
*os << node->nested_type_name (scope, "_slice", "_") << " *_tao_slice);" << be_nl;
@@ -224,9 +240,6 @@ int be_visitor_array_ch::visit_array (be_array *node)
<< node->nested_type_name (scope, "_copy", "_") << " (";
*os << node->nested_type_name (scope, "_slice", "_") << " *_tao_to, const ";
*os << node->nested_type_name (scope, "_slice", "_") << " *_tao_from);" << be_nl;
- *os << storage_class << "void "
- << node->nested_type_name (scope, "_free", "_") << " (";
- *os << node->nested_type_name (scope, "_slice", "_") << " *_tao_slice);" << be_nl;
}
*os << "\n";
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp
index 5d4fc8a2f09..97e7f4c9421 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp
@@ -62,6 +62,9 @@ be_visitor_sequence_ci::visit_sequence (be_sequence *node)
// end of instantiation
+ // generate the ifdefined macro for the sequence type
+ os->gen_ifdef_macro (node->flatname ());
+
// all we do is generate the _var and _out implementations
if (this->gen_var_impl (node) == -1)
{
@@ -79,6 +82,10 @@ be_visitor_sequence_ci::visit_sequence (be_sequence *node)
"codegen for _out failed\n"), -1);
}
+ // generate the endif macro for the sequence type
+ os->gen_endif ();
+ node->cli_inline_gen (1);
+
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
index a911e7b7592..be960e1a05f 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp
@@ -290,6 +290,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node)
}
os->gen_endif ();
+ node->cli_stub_gen (1);
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp
index 0a22dc7ae4a..d3b635e2233 100644
--- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp
@@ -192,7 +192,7 @@ be_visitor_union_branch_public_reset_cs::visit_interface (be_interface *node)
), -1);
}
TAO_OutStream *os = this->ctx_->stream ();
- *os << "CORBA::release (this->u_." << ub->local_name () << "_);" << be_nl;
+ *os << "delete this->u_." << ub->local_name () << "_;" << be_nl;
*os << "break;" << be_uidt_nl;
return 0;
@@ -215,7 +215,7 @@ be_visitor_union_branch_public_reset_cs::visit_interface_fwd (be_interface_fwd *
), -1);
}
TAO_OutStream *os = this->ctx_->stream ();
- *os << "CORBA::release (this->u_." << ub->local_name () << "_);" << be_nl;
+ *os << "delete this->u_." << ub->local_name () << "_;" << be_nl;
*os << "break;" << be_uidt_nl;
return 0;