diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-09-28 06:53:11 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2009-09-28 06:53:11 +0000 |
commit | 3ccf02ce89c305f96764ea4ce4b38d4711379e41 (patch) | |
tree | dba5f1f9505aca11f9a5e6f9fbbdf2e9619ff662 /TAO | |
parent | c41077603c371159b894630990d2b46ab29e643e (diff) | |
download | ATCD-3ccf02ce89c305f96764ea4ce4b38d4711379e41.tar.gz |
fixed fuzz
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_component/component_ex_idl.cpp | 159 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_template_interface.h | 5 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_utils.cpp | 5 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/y.tab.h | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/ast_tmpl_mirror_port.h | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/ast_tmpl_port.h | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/fe_component_header.h | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/fe_home_header.h | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/fe_utils.h | 3 | ||||
-rw-r--r-- | TAO/TAO_IDL/util/utl_global.cpp | 9 |
10 files changed, 104 insertions, 91 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ex_idl.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ex_idl.cpp index 659c0ca279f..2dc48dfd9e2 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_ex_idl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_ex_idl.cpp @@ -45,15 +45,15 @@ be_visitor_component_ex_idl::visit_component (be_component *node) { return 0; } - + node_ = node; - + this->gen_facets (); - + this->gen_component (); - + this->gen_executor_derived (); - + return 0; } @@ -67,9 +67,9 @@ be_visitor_component_ex_idl::visit_attribute (be_attribute *node) // accepted by parser for attributes. os_ << be_nl << (rd_only ? "readonly " : "") << "attribute "; - + be_type *ft = be_type::narrow_from_decl (node->field_type ()); - + os_ << IdentifierHelper::type_name (ft, this); os_ << " " << IdentifierHelper::try_escape (node->original_local_name ()).c_str (); @@ -90,9 +90,9 @@ be_visitor_component_ex_idl::visit_sequence (be_sequence *node) { // Keep output statements separate because of side effects. os_ << "sequence<"; - + be_type *bt = be_type::narrow_from_decl (node->base_type ()); - + os_ << IdentifierHelper::type_name (bt, this); if (!node->unbounded ()) @@ -126,35 +126,35 @@ void be_visitor_component_ex_idl::gen_nesting_open (AST_Decl *node) { os_ << be_nl; - + for (UTL_IdListActiveIterator i (node->name ()); ! i.is_done () ;) { UTL_ScopedName tmp (i.item (), 0); AST_Decl *scope = node->defined_in ()->lookup_by_name (&tmp, true); - + if (scope == 0) { i.next (); continue; } - + ACE_CString module_name = IdentifierHelper::try_escape (scope->original_local_name ()); - + if (module_name == "") { i.next (); continue; } - + i.next (); - + if (i.is_done ()) { break; } - + os_ << be_nl << "module " << module_name.c_str () << be_nl << "{" << be_idt; @@ -167,20 +167,20 @@ be_visitor_component_ex_idl::gen_nesting_close (AST_Decl *node) for (UTL_IdListActiveIterator i (node->name ()); ! i.is_done () ;) { ACE_CString module_name (i.item ()->get_string ()); - + if (module_name == "") { i.next (); continue; } - + i.next (); - + if (i.is_done ()) { break; } - + os_ << be_uidt_nl << "};"; } @@ -194,15 +194,15 @@ be_visitor_component_ex_idl::gen_facets (void) si.next ()) { AST_Decl *d = si.item (); - + if (d->node_type () != AST_Decl::NT_provides) { continue; } - + AST_Provides *p = AST_Provides::narrow_from_decl (d); - + be_type *impl = be_type::narrow_from_decl (p->provides_type ()); @@ -210,16 +210,16 @@ be_visitor_component_ex_idl::gen_facets (void) { continue; } - + // Without the '-Glfa' option, generate facet executor IDL - // only for facets whose interface type is in the main file. + // only for facets whose interface type is in the main file. if (impl->imported () && !be_global->gen_lem_force_all ()) { continue; } - + this->gen_nesting_open (impl); - + os_ << be_nl << "local interface CCM_" << impl->original_local_name ()->get_string () @@ -227,12 +227,12 @@ be_visitor_component_ex_idl::gen_facets (void) << IdentifierHelper::orig_sn (impl->name ()).c_str () << be_nl << "{" << be_idt; - + os_ << be_uidt_nl << "};"; - + this->gen_nesting_close (impl); - + impl->ex_idl_facet_gen (true); } } @@ -241,9 +241,9 @@ void be_visitor_component_ex_idl::gen_component (void) { this->gen_nesting_open (node_); - + this->gen_executor_base (); - + this->gen_context (); this->gen_nesting_close (node_); @@ -253,17 +253,17 @@ void be_visitor_component_ex_idl::gen_executor_base (void) { AST_Component *base = node_->base_component (); - + os_ << be_nl << "local interface CCM_" << node_->original_local_name ()->get_string () << be_idt_nl << ": "; - + if (base == 0) { os_ << "::Components::EnterpriseComponent"; - + this->gen_supported (); } else @@ -271,19 +271,19 @@ be_visitor_component_ex_idl::gen_executor_base (void) ACE_CString sname_str = IdentifierHelper::orig_sn ( ScopeAsDecl (base->defined_in ())->name ()); - + const char *sname = sname_str.c_str (); const char *global = (sname_str == "" ? "" : "::"); - + os_ << global << sname << "::CCM_" << base->original_local_name ()->get_string (); } - + os_ << be_uidt_nl << "{" << be_idt; - + this->gen_executor_contents (); - + os_ << be_uidt_nl << "};"; } @@ -292,16 +292,16 @@ void be_visitor_component_ex_idl::gen_supported (void) { os_ << be_idt; - + AST_Interface **supported = node_->supports (); - + for (long i = 0; i < node_->n_supports (); ++i) { os_ << "," << be_nl << "::" << IdentifierHelper::orig_sn (supported[i]->name ()).c_str (); } - + os_ << be_uidt; } @@ -310,7 +310,7 @@ be_visitor_component_ex_idl::gen_executor_contents (void) { this->gen_facet_ops (); this->gen_consumer_ops (); - + /// This picks up the attributes. if (this->visit_scope (node_) == -1) { @@ -329,29 +329,29 @@ be_visitor_component_ex_idl::gen_facet_ops (void) si.next ()) { AST_Decl *d = si.item (); - + if (d->node_type () != AST_Decl::NT_provides) { continue; } - + AST_Provides *p = AST_Provides::narrow_from_decl (d); be_type *impl = be_type::narrow_from_decl (p->provides_type ()); - + AST_Decl *scope = ScopeAsDecl (impl->defined_in ()); - + ACE_CString sname_str = IdentifierHelper::orig_sn (scope->name ()); const char *sname = sname_str.c_str (); - + const char *lname = impl->original_local_name ()->get_string (); - + const char *global = (sname_str == "" ? "" : "::"); - + os_ << be_nl << global << sname << "::CCM_" << lname << " get_" << p->local_name ()->get_string () << " ();"; @@ -366,18 +366,18 @@ be_visitor_component_ex_idl::gen_consumer_ops (void) si.next ()) { AST_Decl *d = si.item (); - + if (d->node_type () != AST_Decl::NT_consumes) { continue; } - + AST_Consumes *c = AST_Consumes::narrow_from_decl (d); be_type *impl = be_type::narrow_from_decl (c->consumes_type ()); - + os_ << be_nl << "void push_" << c->local_name ()->get_string () << " (in ::" @@ -426,9 +426,9 @@ be_visitor_component_ex_idl::gen_context (void) << node_->original_local_name ()->get_string () << "_Context" << be_idt_nl << ": "; - + AST_Component *base = node_->base_component (); - + if (base == 0) { os_ << "::Components::SessionContext"; @@ -436,26 +436,26 @@ be_visitor_component_ex_idl::gen_context (void) else { AST_Decl *scope = ScopeAsDecl (base->defined_in ()); - + ACE_CString sname_str = IdentifierHelper::orig_sn (scope->name ()); const char *sname = sname_str.c_str (); - + const char *lname = base->original_local_name ()->get_string (); - + const char *global = (sname_str == "" ? "" : "::"); - + os_ << global << sname << "::CCM_" << lname << "_Context"; } - + os_ << be_uidt_nl << "{" << be_idt; - + this->gen_publisher_ops (); this->gen_emitter_ops (); this->gen_receptacle_ops (); - + os_ << be_uidt_nl << "};"; } @@ -468,18 +468,18 @@ be_visitor_component_ex_idl::gen_publisher_ops (void) si.next ()) { AST_Decl *d = si.item (); - + if (d->node_type () != AST_Decl::NT_publishes) { continue; } - + AST_Publishes *p = AST_Publishes::narrow_from_decl (d); be_type *impl = be_type::narrow_from_decl (p->publishes_type ()); - + os_ << be_nl << "void push_" << p->local_name ()->get_string () << " (in ::" << IdentifierHelper::orig_sn (impl->name ()).c_str () @@ -495,18 +495,18 @@ be_visitor_component_ex_idl::gen_emitter_ops (void) si.next ()) { AST_Decl *d = si.item (); - + if (d->node_type () != AST_Decl::NT_emits) { continue; } - + AST_Emits *e = AST_Emits::narrow_from_decl (d); be_type *impl = be_type::narrow_from_decl (e->emits_type ()); - + os_ << be_nl << "void push_" << e->local_name ()->get_string () << " (in ::" << IdentifierHelper::orig_sn (impl->name ()).c_str () @@ -522,21 +522,21 @@ be_visitor_component_ex_idl::gen_receptacle_ops (void) si.next ()) { AST_Decl *d = si.item (); - + if (d->node_type () != AST_Decl::NT_uses) { continue; } - + AST_Uses *u = AST_Uses::narrow_from_decl (d); be_type *impl = be_type::narrow_from_decl (u->uses_type ()); - + os_ << be_nl << "::"; - + // Note that we don't strip off the possible '_cxx_' when // adding the 'Connections' suffix. The front end will // create this implied IDL node with the '_cxx_' so lookup @@ -562,14 +562,14 @@ void be_visitor_component_ex_idl::gen_executor_derived (void) { AST_Decl *scope = ScopeAsDecl (node_->defined_in ()); - + ACE_CString sname_str = IdentifierHelper::orig_sn (scope->name ()); const char *sname = sname_str.c_str (); - + const char *lname = node_->original_local_name ()->get_string (); - + const char *global = (sname_str == "" ? "" : "::"); os_ << be_nl << be_nl @@ -577,7 +577,7 @@ be_visitor_component_ex_idl::gen_executor_derived (void) << "{" << be_idt_nl << "typedef " << global << sname << "::CCM_" << lname << "_Context " << lname << "_Exec_Context;"; - + os_ << be_nl << be_nl << "local interface " << lname << "_Exec" << be_idt_nl << ": " << global << sname << "::CCM_" << lname @@ -585,7 +585,8 @@ be_visitor_component_ex_idl::gen_executor_derived (void) << "::Components::SessionComponent" << be_uidt << be_uidt_nl << "{" << be_nl << "};"; - + os_ << be_uidt_nl << "};"; -}
\ No newline at end of file +} + diff --git a/TAO/TAO_IDL/be_include/be_template_interface.h b/TAO/TAO_IDL/be_include/be_template_interface.h index 6b043839b43..cfe719c72ea 100644 --- a/TAO/TAO_IDL/be_include/be_template_interface.h +++ b/TAO/TAO_IDL/be_include/be_template_interface.h @@ -50,10 +50,11 @@ public: virtual ~be_template_interface (void); virtual void destroy (void); - + virtual int accept (be_visitor *visitor); DEF_NARROW_FROM_DECL (be_template_interface); }; -#endif /* TAO_BE_TEMPLATE_INTERFACE_H */
\ No newline at end of file +#endif /* TAO_BE_TEMPLATE_INTERFACE_H */ + diff --git a/TAO/TAO_IDL/fe/fe_utils.cpp b/TAO/TAO_IDL/fe/fe_utils.cpp index 2f4c371ddfe..834e824e3c5 100644 --- a/TAO/TAO_IDL/fe/fe_utils.cpp +++ b/TAO/TAO_IDL/fe/fe_utils.cpp @@ -58,8 +58,9 @@ FE_Utils::T_Inst_Info::destroy (void) this->name_->destroy (); delete this->name_; this->name_ = 0; - + this->args_->destroy (); delete this->args_; this->args_ = 0; -}
\ No newline at end of file +} + diff --git a/TAO/TAO_IDL/fe/y.tab.h b/TAO/TAO_IDL/fe/y.tab.h index f77d9917d7c..62966770905 100644 --- a/TAO/TAO_IDL/fe/y.tab.h +++ b/TAO/TAO_IDL/fe/y.tab.h @@ -259,7 +259,7 @@ typedef union TAO_YYSTYPE } /* Line 1489 of yacc.c. */ - TAO_YYSTYPE; + TAO_YYSTYPE; # define tao_yystype TAO_YYSTYPE /* obsolescent; will be withdrawn */ # define TAO_YYSTYPE_IS_DECLARED 1 # define TAO_YYSTYPE_IS_TRIVIAL 1 diff --git a/TAO/TAO_IDL/include/ast_tmpl_mirror_port.h b/TAO/TAO_IDL/include/ast_tmpl_mirror_port.h index f38b586ae86..b3a94bcbd93 100644 --- a/TAO/TAO_IDL/include/ast_tmpl_mirror_port.h +++ b/TAO/TAO_IDL/include/ast_tmpl_mirror_port.h @@ -1,3 +1,6 @@ +// This may look like C, but it's really -*- C++ -*- +// $Id$ + #ifndef AST_TMPL_MIRROR_PORT_H #define AST_TMPL_MIRROR_PORT_H diff --git a/TAO/TAO_IDL/include/ast_tmpl_port.h b/TAO/TAO_IDL/include/ast_tmpl_port.h index c899318462c..36e419e8f63 100644 --- a/TAO/TAO_IDL/include/ast_tmpl_port.h +++ b/TAO/TAO_IDL/include/ast_tmpl_port.h @@ -1,3 +1,6 @@ +// This may look like C, but it's really -*- C++ -*- +// $Id$ + #ifndef AST_TMPL_PORT_H #define AST_TMPL_PORT_H diff --git a/TAO/TAO_IDL/include/fe_component_header.h b/TAO/TAO_IDL/include/fe_component_header.h index c17a6c944e5..055193f9c8d 100644 --- a/TAO/TAO_IDL/include/fe_component_header.h +++ b/TAO/TAO_IDL/include/fe_component_header.h @@ -39,4 +39,5 @@ protected: AST_Component *base_component_; }; -#endif /* FE_COMPONENT_HEADER_H */
\ No newline at end of file +#endif /* FE_COMPONENT_HEADER_H */ + diff --git a/TAO/TAO_IDL/include/fe_home_header.h b/TAO/TAO_IDL/include/fe_home_header.h index acc7df2b871..a981e03029c 100644 --- a/TAO/TAO_IDL/include/fe_home_header.h +++ b/TAO/TAO_IDL/include/fe_home_header.h @@ -42,4 +42,5 @@ protected: void compile_primary_key (UTL_ScopedName *primary_key); }; -#endif /* FE_HOME_HEADER_H */
\ No newline at end of file +#endif /* FE_HOME_HEADER_H */ + diff --git a/TAO/TAO_IDL/include/fe_utils.h b/TAO/TAO_IDL/include/fe_utils.h index 42dff22296a..df612ef6d21 100644 --- a/TAO/TAO_IDL/include/fe_utils.h +++ b/TAO/TAO_IDL/include/fe_utils.h @@ -55,4 +55,5 @@ struct TAO_IDL_FE_Export FE_Utils }; }; -#endif /* FE_UTILS_H */
\ No newline at end of file +#endif /* FE_UTILS_H */ + diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index b86e04cdf9f..9b9af5b4753 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -2077,7 +2077,7 @@ void IDL_GlobalData::original_local_name (Identifier *local_name) { const char *lname = local_name->get_string (); - + // Remove _cxx_ if: // 1. it occurs and // 2. it occurs at the beginning of the string and @@ -2085,10 +2085,10 @@ IDL_GlobalData::original_local_name (Identifier *local_name) if (ACE_OS::strstr (lname, "_cxx_") == lname) { TAO_IDL_CPP_Keyword_Table cpp_key_tbl; - + unsigned int len = static_cast<unsigned int> (ACE_OS::strlen (lname + 5)); - + const TAO_IDL_CPP_Keyword_Entry *entry = cpp_key_tbl.lookup (lname + 5, len); @@ -2098,4 +2098,5 @@ IDL_GlobalData::original_local_name (Identifier *local_name) local_name->replace_string (tmp.c_str ()); } } -}
\ No newline at end of file +} + |