Changeset 348 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Oct 12, 2007, 3:25:54 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/Class.h
r347 r348 493 493 std::vector<long> vtblMasterList; 494 494 public: 495 int GetVtblMasterListIndex( const UserProc *pUserProc ) const; 496 int GetFuncNumInVtbl( const UserProc *pUserProc ) const; 495 void GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const; 497 496 long GetVtblMasterListOffset() const; 498 497 void GenerateVTableMasterList( const std::vector<long> &vtableMasterList, long &offset ); -
trunk/abdev/BasicCompiler_Common/include/Symbol.h
r271 r348 69 69 return name; 70 70 } 71 std::string GetFullName() const; 71 72 72 73 // シンボル比較 -
trunk/abdev/BasicCompiler_Common/src/Class.cpp
r347 r348 817 817 } 818 818 819 int CClass::GetVtblMasterListIndex( const UserProc *pUserProc ) const 820 { 821 int index = 0; 819 void CClass::GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const 820 { 821 vtblMasterListIndex = 0; 822 823 vtblIndex = 0; 822 824 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){ 823 825 if( &pMethod->GetUserProc() == pUserProc ) 824 826 { 825 return index; 827 return; 828 } 829 830 if( pMethod->IsVirtual() ) 831 { 832 vtblIndex++; 826 833 } 827 834 } … … 829 836 BOOST_FOREACH( const ::Interface *pInterface, interfaces ) 830 837 { 831 index++; 832 838 vtblMasterListIndex++; 839 840 vtblIndex = 0; 833 841 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){ 834 842 if( &pMethod->GetUserProc() == pUserProc ) 835 843 { 836 return index; 844 return; 845 } 846 847 if( pMethod->IsVirtual() ) 848 { 849 vtblIndex++; 837 850 } 838 851 } … … 840 853 841 854 SetError(); 842 return 0; 843 } 844 int CClass::GetFuncNumInVtbl( const UserProc *pUserProc ) const 845 { 846 int n = 0; 847 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){ 848 if( &pMethod->GetUserProc() == pUserProc ) break; 849 if( pMethod->IsVirtual() ) n++; 850 } 851 return n; 855 return; 852 856 } 853 857 long CClass::GetVtblMasterListOffset() const … … 1523 1527 } 1524 1528 1525 if( pobj_c->GetName() == "Object" || dwClassType == ESC_TYPE ){ 1529 if( pobj_c->GetName() == "Object" 1530 || pobj_c->GetFullName() == "ActiveBasic.Core.InterfaceInfo" 1531 || dwClassType == ESC_TYPE ) 1532 { 1533 // 何も継承しない 1534 1526 1535 if( &pobj_c->GetSuperClass() || pobj_c->GetVtblNum() ) 1527 1536 { -
trunk/abdev/BasicCompiler_Common/src/Symbol.cpp
r271 r348 26 26 namespaceScopes = NamespaceScopes( areaName ); 27 27 name = nestName; 28 } 29 30 std::string Symbol::GetFullName() const 31 { 32 if( namespaceScopes.size() ) 33 { 34 return namespaceScopes.ToString() + "." + name; 35 } 36 37 return name; 28 38 } 29 39
Note:
See TracChangeset
for help on using the changeset viewer.