summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-01 02:37:33 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-01 02:37:33 +0000
commit4a65aaf95cd5b0517d4af2abd3bf4548c7b04c6e (patch)
treefa80104421351eeaad38268be54e94eaecb3031c
parente9660dd6848dd10a99d85fbc3f80471c5058045b (diff)
downloadATCD-4a65aaf95cd5b0517d4af2abd3bf4548c7b04c6e.tar.gz
ChangeLogTag: Mon Feb 28 20:31:35 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog19
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp14
-rw-r--r--TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp12
3 files changed, 40 insertions, 5 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 1e2565ba52e..50139213079 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,22 @@
+Mon Feb 28 20:31:35 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/be/be_visitor_constant/constant_ch.cpp:
+ * TAO_IDL/be/be_visitor_constant/constant_cs.cpp:
+
+ Enabled inlined code generation for constants
+ (constant's value is assigned in the header file declaration)
+ when the constant is declared inside an interface, home,
+ valuetype or eventtype. The only documented problem with
+ inlined code generation for these types of constants is
+ when pre-compiled headers are used, in which case the IDL
+ compiler option -Guc can be used to explicitly turn off
+ inline constant generation. Thanks to Steve Baker
+ <steven_d_baker@raytheon.com> for redirecting our attention
+ to the known problem that uninlined constants cannot be used
+ as union case labels, or array, sequence or string bounds
+ since the C++ compiler does not recognize them as constant
+ values.
+
Mon Feb 28 17:06:44 2005 Iliyan Jeliazkov <jeliazkov_i@ociweb.com>
* orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.h:
diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp
index 407c0dd45eb..b90eb3855f4 100644
--- a/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_ch.cpp
@@ -125,9 +125,17 @@ be_visitor_constant_ch::visit_constant (be_constant *node)
*os << " " << node->local_name ();
}
- if (!node->is_nested ()
- || (node->defined_in ()->scope_node_type () == AST_Decl::NT_module
- && be_global->gen_inline_constants ()))
+ // (JP) I'm turning on inline constants by default for all scopes.
+ // The only problem I remember having with them is with
+ // pre-compiled headers, in which case folks can use -Guc to
+ // explicitly uninline constants. If this change turns up
+ // problems in our nightly builds, I'll revert it, otherwise it
+ // should stay.
+
+// if (!node->is_nested ()
+// || (node->defined_in ()->scope_node_type () == AST_Decl::NT_module
+// && be_global->gen_inline_constants ()))
+ if (!node->is_nested () || be_global->gen_inline_constants ())
{
*os << " = " << node->constant_value ();
}
diff --git a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp
index dc5f0fcd4d6..4209c460f8e 100644
--- a/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_constant/constant_cs.cpp
@@ -47,10 +47,18 @@ be_visitor_constant_cs::visit_constant (be_constant *node)
{
return 0;
}
+
+ // (JP) I'm turning on inline constants by default for all scopes.
+ // The only problem I remember having with them is with
+ // pre-compiled headers, in which case folks can use -Guc to
+ // explicitly uninline constants. If this change turns up
+ // problems in our nightly builds, I'll revert it, otherwise it
+ // should stay.
// Was the constant value already assigned in *C.h?
- if (node->defined_in ()->scope_node_type () == AST_Decl::NT_module
- && be_global->gen_inline_constants ())
+// if (node->defined_in ()->scope_node_type () == AST_Decl::NT_module
+// && be_global->gen_inline_constants ())
+ if (be_global->gen_inline_constants () || !node->is_nested ())
{
return 0;
}