Bug 4102 - IDL Compiler gen wrong codes for AMH since 2.0.6
Summary: IDL Compiler gen wrong codes for AMH since 2.0.6
Status: NEW
Alias: None
Product: TAO
Classification: Unclassified
Component: IDL Compiler (show other bugs)
Version: 2.2.0
Hardware: All All
: P3 normal
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2013-03-25 20:12 CDT by Jiang Wei
Modified: 2020-09-25 04:05 CDT (History)
0 users

See Also:


Attachments
Patch to correct this problem (9.21 KB, patch)
2013-03-25 20:12 CDT, Jiang Wei
Details
Regression Test (2.18 KB, application/x-compressed-tar)
2013-03-25 23:50 CDT, Jiang Wei
Details
Patch v2.0 fix amh and c++ keyword bugs (10.21 KB, patch)
2013-03-26 02:47 CDT, Jiang Wei
Details
Regression Test v2 add c++ keyword into Test.idl (2.24 KB, application/x-gzip)
2013-03-26 02:48 CDT, Jiang Wei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiang Wei 2013-03-25 20:12:08 CDT
Created attachment 1460 [details]
Patch to correct this problem

IDL Compiler gen wrong codes for attributes in  AMH_*_Perfect_Hash_OpTable::lockup::TAO_operation_db_entry


  static const TAO_operation_db_entry wordlist[] =
    {
      {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0},
      {"_is_a", &TAO_AMH_Skeletons::_is_a_amh_skel, 0},

      //*** Wrong codes ***
      {"_get_t", &POA_Test::Roundtrip::_get_t_skel, 0},  
      {"_set_t", &POA_Test::Roundtrip::_set_t_skel, 0},
      {"_get_desc", &POA_Test::Roundtrip::_get_desc_skel, 0},

      {"_component", &TAO_AMH_Skeletons::_component_amh_skel, 0},
      {"test_method", &POA_Test::AMH_Roundtrip::test_method_skel, 0},
      {"_non_existent", &TAO_AMH_Skeletons::_non_existent_amh_skel, 0},
      {"_repository_id", &TAO_AMH_Skeletons::_repository_id_amh_skel, 0},
      {"start_test", &POA_Test::AMH_Roundtrip::start_test_skel, 0},
      {"end_test", &POA_Test::AMH_Roundtrip::end_test_skel, 0},
      {"_interface", &TAO_AMH_Skeletons::_interface_amh_skel, 0},
    };
Comment 1 Jiang Wei 2013-03-25 23:50:44 CDT
Created attachment 1461 [details]
Regression Test
Comment 2 Jiang Wei 2013-03-26 02:47:08 CDT
Created attachment 1462 [details]
Patch v2.0

fix amh and c++ keyword bugs

IDL Complier has another bug when operation(or attribute) name is a c++ keyword.

static const TAO_operation_db_entry wordlist[] =
    {
      {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0},
      {"_is_a", &TAO_AMH_Skeletons::_is_a_amh_skel, 0},
      {"modify", &POA_CosTrading::AMH_Register::modify_skel, 0},
      {"resolve", &POA_CosTrading::AMH_Register::resolve_skel, 0},
      {"withdraw", &POA_CosTrading::AMH_Register::withdraw_skel, 0},
      {"_interface", &TAO_AMH_Skeletons::_interface_amh_skel, 0},
>>>>  {"export", &POA_CosTrading::AMH_Register::export_skel, 0},
Comment 3 Jiang Wei 2013-03-26 02:48:17 CDT
Created attachment 1463 [details]
Regression Test v2
add c++ keyword into Test.idl
Comment 4 Johnny Willemsen 2013-08-12 07:08:50 CDT
Still a valid problem
Comment 5 Johnny Willemsen 2020-09-25 04:05:28 CDT
See also http://list.isis.vanderbilt.edu/pipermail/tao-users/2020-September/000235.html for a similar issue