diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-30 18:55:07 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-30 18:55:07 +0000 |
commit | fb8d2e4aada249ef193da589f0d0a6a007890c5f (patch) | |
tree | c29272afd02f66c27f88d732fca6f54dc3e6f320 | |
parent | c872c2eb72dc9d986573ac125bc697d40fbddf82 (diff) | |
download | ATCD-fb8d2e4aada249ef193da589f0d0a6a007890c5f.tar.gz |
Mon Jul 30 18:54:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | TAO/ChangeLog | 17 | ||||
-rw-r--r-- | TAO/MPC/config/corba_e_compact.mpb | 2 | ||||
-rw-r--r-- | TAO/MPC/config/corba_e_micro.mpb | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_global.cpp | 32 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_interface.cpp | 20 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_global.h | 15 | ||||
-rw-r--r-- | TAO/docs/compiler.html | 7 |
11 files changed, 113 insertions, 31 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index addaf728c12..c7ecb9c5f5a 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,20 @@ +Mon Jul 30 18:54:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * docs/compiler.html: + * MPC/config/corba_e_compact.mpb: + * MPC/config/corba_e_micro.mpb: + * TAO_IDL/be/be_global.cpp: + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_visitor_component/component_sh.cpp: + * TAO_IDL/be/be_visitor_interface/amh_sh.cpp: + * TAO_IDL/be/be_visitor_interface/interface_sh.cpp: + * TAO_IDL/be/be_visitor_interface/interface_ss.cpp: + * TAO_IDL/be_include/be_global.h: + Added new option -Gce indicating that we are compiling with CORBA/e + enabled. In that case we don't need to generate the _component + method in the skeleton which safes footprint. This fixes bugzilla + issue 2968 + Mon Jul 30 18:17:45 UTC 2007 Chad Elliott <elliott_c@ociweb.com> * orbsvcs/orbsvcs/Notify/MonitorControl/NotificationServiceMonitor_i.cpp: diff --git a/TAO/MPC/config/corba_e_compact.mpb b/TAO/MPC/config/corba_e_compact.mpb index 7e7627a4878..60e92d3bdab 100644 --- a/TAO/MPC/config/corba_e_compact.mpb +++ b/TAO/MPC/config/corba_e_compact.mpb @@ -3,5 +3,5 @@ feature (corba_e_compact) : taoidldefaults { macros += CORBA_E_COMPACT - idlflags += -DCORBA_E_COMPACT + idlflags += -DCORBA_E_COMPACT -Gce } diff --git a/TAO/MPC/config/corba_e_micro.mpb b/TAO/MPC/config/corba_e_micro.mpb index 5f14ae228b9..c4b502141e1 100644 --- a/TAO/MPC/config/corba_e_micro.mpb +++ b/TAO/MPC/config/corba_e_micro.mpb @@ -3,5 +3,5 @@ feature (corba_e_micro) : taoidldefaults { macros += CORBA_E_MICRO - idlflags += -DCORBA_E_MICRO + idlflags += -DCORBA_E_MICRO -Gce } diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp index ca90900f619..7b2d1b6b9b5 100644 --- a/TAO/TAO_IDL/be/be_global.cpp +++ b/TAO/TAO_IDL/be/be_global.cpp @@ -83,6 +83,7 @@ BE_GlobalData::BE_GlobalData (void) gen_assign_op_ (false), gen_thru_poa_collocation_ (true), // Default is thru_poa. gen_direct_collocation_ (false), + gen_corba_e_ (false), opt_tc_ (false), ami_call_back_ (false), gen_amh_classes_ (false), @@ -1038,6 +1039,19 @@ BE_GlobalData::gen_direct_collocation (void) const } void +BE_GlobalData::gen_corba_e (bool val) +{ + this->gen_corba_e_ = val; +} + +bool +BE_GlobalData::gen_corba_e (void) const +{ + return this->gen_corba_e_; +} + + +void BE_GlobalData::opt_tc (bool val) { this->opt_tc_ = val; @@ -2008,6 +2022,24 @@ BE_GlobalData::parse_args (long &i, char **av) break; } + else if (av[i][2] == 'c') + { + if (av[i][3] == 'e') + { + // CORBA/e. + be_global->gen_corba_e (true); + } + else + { + ACE_ERROR (( + LM_ERROR, + ACE_TEXT ("IDL: I don't understand ") + ACE_TEXT ("the '%s' option\n"), + av[i] + )); + } + break; + } else if (av[i][2] == 't') { // Optimized typecode generation. diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 72313d62eb3..1078781b6c9 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -837,10 +837,13 @@ be_interface::gen_operation_table (const char *flat_name, this->skel_count_++; - *os << "{\"_component\", &" << skeleton_class_name - << "::_component_skel, 0}," << be_nl; + if (!be_global->gen_corba_e ()) + { + *os << "{\"_component\", &" << skeleton_class_name + << "::_component_skel, 0}," << be_nl; - this->skel_count_++; + this->skel_count_++; + } *os << "{\"_interface\", &" << skeleton_class_name << "::_interface_skel, 0}," << be_nl; @@ -997,10 +1000,13 @@ be_interface::gen_operation_table (const char *flat_name, this->skel_count_++; - *os << "_component,&" - << skeleton_class_name - << "::_component_skel, 0" << be_nl; - this->skel_count_++; + if (!be_global->gen_corba_e ()) + { + *os << "_component,&" + << skeleton_class_name + << "::_component_skel, 0" << be_nl; + this->skel_count_++; + } *os << "_interface,&" << skeleton_class_name diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp index e3291848913..8f8f22d2978 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_sh.cpp @@ -183,12 +183,15 @@ be_visitor_component_sh::visit_component (be_component *node) << "void *servant_upcall" << be_uidt_nl << ");" << be_uidt_nl << be_nl; - // Add a skeleton for our _component method. - *os << "static void _component_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest &req," << be_nl - << "void *obj," << be_nl - << "void *servant_upcall" << be_uidt_nl - << ");" << be_uidt_nl << be_nl; + if (!be_global->gen_corba_e ()) + { + // Add a skeleton for our _component method. + *os << "static void _component_skel (" << be_idt << be_idt_nl + << "TAO_ServerRequest &req," << be_nl + << "void *obj," << be_nl + << "void *servant_upcall" << be_uidt_nl + << ");" << be_uidt_nl << be_nl; + } // Add a skeleton for our _repository_id method. *os << "static void _repository_id_skel (" << be_idt << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp index b6048ac5ed0..0d3bc9a9e2d 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_sh.cpp @@ -143,12 +143,15 @@ be_visitor_amh_interface_sh::visit_interface (be_interface *node) << "void *servant_upcall" << be_uidt_nl << ");" << be_uidt_nl << be_nl; - // Add a skeleton for our _component method. - *os << "static void _component_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest &req," << be_nl - << "void *obj," << be_nl - << "void *servant_upcall" << be_uidt_nl - << ");" << be_uidt_nl << be_nl; + if (!be_global->gen_corba_e ()) + { + // Add a skeleton for our _component method. + *os << "static void _component_skel (" << be_idt << be_idt_nl + << "TAO_ServerRequest &req," << be_nl + << "void *obj," << be_nl + << "void *servant_upcall" << be_uidt_nl + << ");" << be_uidt_nl << be_nl; + } // Add a skeleton for our _repository_id method. *os << "static void _repository_id_skel (" << be_idt << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp index aa6f995848c..93442a1b0ad 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_sh.cpp @@ -191,12 +191,15 @@ be_visitor_interface_sh::visit_interface (be_interface *node) << "void * servant" << be_uidt_nl << ");" << be_uidt_nl << be_nl; - // Add a skeleton for our _component method. - *os << "static void _component_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest & req," << be_nl - << "void * servant_upcall," << be_nl - << "void * servant" << be_uidt_nl - << ");" << be_uidt_nl << be_nl; + if (!be_global->gen_corba_e ()) + { + // Add a skeleton for our _component method. + *os << "static void _component_skel (" << be_idt << be_idt_nl + << "TAO_ServerRequest & req," << be_nl + << "void * servant_upcall," << be_nl + << "void * servant" << be_uidt_nl + << ");" << be_uidt_nl << be_nl; + } // Add a skeleton for our _repository_id method. *os << "static void _repository_id_skel (" << be_idt << 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 701de416ee9..3c473fd1ebb 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -548,7 +548,9 @@ be_visitor_interface_ss::visit_interface (be_interface *node) << "}" << be_nl << be_nl; - // Generate code for the _component skeleton. + // Generate code for the _component skeleton, don't generate it when + // we use CORBA/e + if (!be_global->gen_corba_e ()) { be_predefined_type rt (AST_PredefinedType::PT_object, 0); // @@ Cheat a little by placing a space before the operation name diff --git a/TAO/TAO_IDL/be_include/be_global.h b/TAO/TAO_IDL/be_include/be_global.h index 639455caa31..61af090c140 100644 --- a/TAO/TAO_IDL/be_include/be_global.h +++ b/TAO/TAO_IDL/be_include/be_global.h @@ -334,10 +334,10 @@ public: void gen_template_export (bool val); // Set the gen_seq_template_export_ member. - + bool gen_ostream_operators (void) const; // Get the gen_ostream_operators_ member. - + void gen_ostream_operators (bool val); // Set the gen_ostream_operators_ member. @@ -430,6 +430,12 @@ public: bool gen_direct_collocation (void) const; // Check if we want to generate Direct collocation stubs. + void gen_corba_e (bool); + // Set whether we want to generate for CORBA/e + + bool gen_corba_e (void) const; + // Check if we want to generate for CORBA/e + void opt_tc (bool); // Set optimized typecodes. @@ -704,6 +710,9 @@ private: bool gen_direct_collocation_; // are we generating Direct collocated stubs? + bool gen_corba_e_; + // are we generating for CORBA/e + bool opt_tc_; // do we generate optimized typecodes? @@ -796,7 +805,7 @@ private: bool gen_template_export_; // Generate explicit export for Visual Studio bug workaround, // needed only in TAO basic sequence *C.h files. - + bool gen_ostream_operators_; // Generate ostream operators for each type declaration, for // debuggin or logging. diff --git a/TAO/docs/compiler.html b/TAO/docs/compiler.html index e5d290bb802..cbd7f9ce69a 100644 --- a/TAO/docs/compiler.html +++ b/TAO/docs/compiler.html @@ -644,6 +644,13 @@ also receives other options that are specific to it.<p> <td> </td> </tr> + <tr><a name="Gce"> + <td><tt>-Gce </tt></td> + + <td>Generated code for CORBA/e. This reduces the size of the generated code</td> + <td> </td> + </tr> + <tr><a name="Gsp"> <td><tt>-Gsp </tt></td> |