summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgokhale <asgokhale@users.noreply.github.com>1998-07-29 14:02:25 +0000
committergokhale <asgokhale@users.noreply.github.com>1998-07-29 14:02:25 +0000
commit9023368489328ed63d187cc9e270e3ba955e7f93 (patch)
tree29aec8dca5a2e0041ee1dcb488eda8beebe62a31
parentc58830a8ae5bb549b8ea15b31cf16403eb03c363 (diff)
downloadATCD-9023368489328ed63d187cc9e270e3ba955e7f93.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c10
-rw-r--r--TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp45
-rw-r--r--TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp44
3 files changed, 99 insertions, 0 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index c5c808ea2bb..81e0558e943 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,13 @@
+Wed Jul 29 08:58:01 1998 Aniruddha Gokhale <gokhale@mambo.cs.wustl.edu>
+
+ * TAO_IDL/be/be_visitor_field/{field_ci, field_cs}.cpp: Added code
+ to handle arrays. I had forgotten to invoke the code generator for
+ arrays that are struct members. I had only handled the header file
+ but not the inline file and the implementation file. The visitor
+ that does this was already done, but it was not getting
+ invoked. Thanks to Andreas Geisler
+ (andreas.geisler@erls.siemens.de) for reporting this problem.
+
Wed Jul 29 06:45:54 1998 David L. Levine <levine@cs.wustl.edu>
* tests/NestedUpcall/MT_Client_Test/ local_server.cpp (MT_Server):
diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp
index b926d660594..6aceee99970 100644
--- a/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_field/field_ci.cpp
@@ -80,6 +80,50 @@ be_visitor_field_ci::visit_field (be_field *node)
int
be_visitor_field_ci::visit_array (be_array *node)
{
+ TAO_OutStream *os; // output stream
+ be_type *bt;
+
+ os = this->ctx_->stream ();
+ // set the right type;
+ if (this->ctx_->alias ())
+ bt = this->ctx_->alias ();
+ else
+ bt = node;
+
+ // if not a typedef and we are defined in the use scope, we must be defined
+
+ if (!this->ctx_->alias () // not a typedef
+ && node->is_child (this->ctx_->scope ()))
+ {
+ // this is the case for anonymous arrays.
+
+ // instantiate a visitor context with a copy of our context. This info
+ // will be modified based on what type of node we are visiting
+ be_visitor_context ctx (*this->ctx_);
+ ctx.node (node); // set the node to be the node being visited. The scope
+ // is still the same
+
+ // first generate the struct declaration
+ ctx.state (TAO_CodeGen::TAO_ARRAY_CI);
+ be_visitor *visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_field_ci::"
+ "visit_array - "
+ "Bad visitor\n"
+ ), -1);
+ }
+ if (node->accept (visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_field_ci::"
+ "visit_array - "
+ "codegen failed\n"
+ ), -1);
+ }
+ delete visitor;
+ }
return 0;
}
@@ -87,6 +131,7 @@ be_visitor_field_ci::visit_array (be_array *node)
int
be_visitor_field_ci::visit_sequence (be_sequence *node)
{
+ // anonymous sequence
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp
index 9c2a196e05f..c3fbec4ccbb 100644
--- a/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_field/field_cs.cpp
@@ -76,6 +76,50 @@ be_visitor_field_cs::visit_field (be_field *node)
int
be_visitor_field_cs::visit_array (be_array *node)
{
+ TAO_OutStream *os; // output stream
+ be_type *bt;
+
+ os = this->ctx_->stream ();
+ // set the right type;
+ if (this->ctx_->alias ())
+ bt = this->ctx_->alias ();
+ else
+ bt = node;
+
+ // if not a typedef and we are defined in the use scope, we must be defined
+
+ if (!this->ctx_->alias () // not a typedef
+ && node->is_child (this->ctx_->scope ()))
+ {
+ // this is the case for anonymous arrays.
+
+ // instantiate a visitor context with a copy of our context. This info
+ // will be modified based on what type of node we are visiting
+ be_visitor_context ctx (*this->ctx_);
+ ctx.node (node); // set the node to be the node being visited. The scope
+ // is still the same
+
+ // first generate the struct declaration
+ ctx.state (TAO_CodeGen::TAO_ARRAY_CS);
+ be_visitor *visitor = tao_cg->make_visitor (&ctx);
+ if (!visitor)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_field_cs::"
+ "visit_array - "
+ "Bad visitor\n"
+ ), -1);
+ }
+ if (node->accept (visitor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%N:%l) be_visitor_field_cs::"
+ "visit_array - "
+ "codegen failed\n"
+ ), -1);
+ }
+ delete visitor;
+ }
return 0;
}