Changeset 639 in dev for trunk/ab5.0/abdev/ab_common/src
- Timestamp:
- Jun 12, 2008, 11:30:50 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/ab_common/src/Lexical
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
r637 r639 869 869 } 870 870 871 bool CClass::Resolve() 872 { 873 // TODO: Resolve 871 bool CClass::Resolve( const ObjectModule &resolver ) 872 { 873 // 型パラメータ 874 BOOST_FOREACH( GenericType &genericType, formalGenericTypes ) 875 { 876 genericType.GetType().Resolve( resolver ); 877 } 878 879 // 基底クラス 880 if( this->pSuperClass ) 881 { 882 if( this->pSuperClass->IsNeedResolve() ) 883 { 884 this->pSuperClass = resolver.meta.GetClasses().FindEx( *pSuperClass ); 885 } 886 } 887 888 // 基底クラスの型パラメータ(実パラメータ) 889 BOOST_FOREACH( Type &superClassActualTypeParameter, superClassActualTypeParameters ) 890 { 891 superClassActualTypeParameter.Resolve( resolver ); 892 } 893 894 // Blittable型情報 895 blittableType.Resolve( resolver ); 896 897 // 実装するインターフェイス 898 BOOST_FOREACH( ::Interface *pInterface, interfaces ) 899 { 900 pInterface->Resolve( resolver ); 901 } 902 903 // 動的メンバ 904 BOOST_FOREACH( Member *pMember, dynamicMembers ) 905 { 906 pMember->Resolve( resolver ); 907 } 908 909 // 静的メンバ 910 BOOST_FOREACH( Member *pMember, staticMembers ) 911 { 912 pMember->Resolve( resolver ); 913 } 914 915 // 動的メソッド 916 BOOST_FOREACH( CMethod *pMethod, GetDynamicMethods() ) 917 { 918 pMethod->Resolve( resolver ); 919 } 920 921 // 静的メソッド 922 BOOST_FOREACH( CMethod *pMethod, staticMethods ) 923 { 924 pMethod->Resolve( resolver ); 925 } 926 927 // テンプレート展開後のクラス 928 BOOST_FOREACH( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, expandedTemplateClasses ) 929 { 930 pExpandedTemplateClass->Resolve( resolver ); 931 } 932 874 933 return true; 875 934 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Const.cpp
r637 r639 7 7 } 8 8 9 bool CConst::Resolve( )9 bool CConst::Resolve( const ObjectModule &resolver ) 10 10 { 11 // TODO: Resolve11 type.Resolve( resolver ); 12 12 return true; 13 13 } … … 78 78 } 79 79 80 bool ConstMacro::Resolve( )80 bool ConstMacro::Resolve( const ObjectModule &resolver ) 81 81 { 82 // TODO: Resolve82 // 依存関係を解決すべきメンバは無い 83 83 return true; 84 84 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/DataTable.cpp
r637 r639 78 78 } 79 79 80 void DataTable::Resolve( )80 void DataTable::Resolve( const ObjectModule &resolver ) 81 81 { 82 // TODO: Resolve 82 BOOST_FOREACH( Schedule &schedule, schedules ) 83 { 84 schedule.Resolve( resolver ); 85 } 83 86 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Delegate.cpp
r637 r639 19 19 } 20 20 21 bool Delegate::Resolve( )21 bool Delegate::Resolve( const ObjectModule &resolver ) 22 22 { 23 // TODO: Resolve 23 Procedure::Resolve( resolver ); 24 25 BOOST_FOREACH( Parameter *pParameter, dynamicParams ) 26 { 27 pParameter->Resolve( resolver ); 28 } 29 24 30 return true; 25 31 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp
r603 r639 52 52 return interfaceName; 53 53 } 54 55 bool Interface::Resolve( const ObjectModule &resolver ) 56 { 57 // 動的メソッド 58 BOOST_FOREACH( CMethod *pMethod, GetDynamicMethods() ) 59 { 60 pMethod->Resolve( resolver ); 61 } 62 63 // クラス 64 if( this->pInterfaceClass ) 65 { 66 if( this->pInterfaceClass->IsNeedResolve() ) 67 { 68 this->pInterfaceClass = resolver.meta.GetClasses().FindLike( pInterfaceClass ); 69 } 70 } 71 72 BOOST_FOREACH( Type &actualTypeParameter, actualTypeParameters ) 73 { 74 actualTypeParameter.Resolve( resolver ); 75 } 76 77 return true; 78 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Member.cpp
r632 r639 40 40 { 41 41 } 42 43 bool Member::Resolve( const ObjectModule &resolver ) 44 { 45 type.Resolve( resolver ); 46 return true; 47 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
r637 r639 253 253 } 254 254 255 void Meta::Resolve( )255 void Meta::Resolve( const ObjectModule &resolver ) 256 256 { 257 257 // 関数・メソッド … … 261 261 { 262 262 UserProc *pUserProc = this->GetUserProcs().Iterator_GetNext(); 263 pUserProc->Resolve( );263 pUserProc->Resolve( resolver ); 264 264 } 265 265 … … 270 270 { 271 271 DllProc *pDllProc = this->GetDllProcs().Iterator_GetNext(); 272 pDllProc->Resolve( );272 pDllProc->Resolve( resolver ); 273 273 } 274 274 … … 279 279 { 280 280 CClass *pClass = this->GetClasses().Iterator_GetNext(); 281 pClass->Resolve( );281 pClass->Resolve( resolver ); 282 282 } 283 283 … … 285 285 BOOST_FOREACH( Variable *pVar, globalVars ) 286 286 { 287 pVar->Resolve( );287 pVar->Resolve( resolver ); 288 288 } 289 289 … … 294 294 { 295 295 CConst *pConst = this->GetGlobalConsts().Iterator_GetNext(); 296 pConst->Resolve( );296 pConst->Resolve( resolver ); 297 297 } 298 298 … … 303 303 { 304 304 ConstMacro *pConstMacro = this->GetGlobalConstMacros().Iterator_GetNext(); 305 pConstMacro->Resolve( );305 pConstMacro->Resolve( resolver ); 306 306 } 307 307 … … 309 309 BOOST_FOREACH( TypeDef &typeDef, typeDefs ) 310 310 { 311 typeDef.Resolve( );311 typeDef.Resolve( resolver ); 312 312 } 313 313 … … 315 315 BOOST_FOREACH( ProcPointer *pProcPointer, procPointers ) 316 316 { 317 pProcPointer->Resolve( );317 pProcPointer->Resolve( resolver ); 318 318 } 319 319 … … 324 324 { 325 325 Delegate *pDelegate = this->GetDelegates().Iterator_GetNext(); 326 pDelegate->Resolve( );327 } 328 } 326 pDelegate->Resolve( resolver ); 327 } 328 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp
r603 r639 1 1 #include "stdafx.h" 2 3 bool CMethod::Resolve( const ObjectModule &resolver ) 4 { 5 if( pUserProc ) 6 { 7 if( pUserProc->IsNeedResolve() ) 8 { 9 pUserProc = resolver.meta.GetUserProcs().FindLike( pUserProc ); 10 } 11 } 12 return true; 13 } 2 14 3 15 DynamicMethod::OverrideResult::EnumType DynamicMethod::Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier ) … … 29 41 } 30 42 43 bool DynamicMethod::Resolve( const ObjectModule &resolver ) 44 { 45 CMethod::Resolve( resolver ); 46 47 if( this->pInheritsClass ) 48 { 49 if( this->pInheritsClass->IsNeedResolve() ) 50 { 51 this->pInheritsClass = resolver.meta.GetClasses().FindLike( pInheritsClass ); 52 } 53 } 54 55 return true; 56 } 31 57 32 58 StaticMethod::StaticMethod( const StaticMethod &staticMethod ) … … 35 61 throw; 36 62 } 63 64 bool StaticMethod::Resolve( const ObjectModule &resolver ) 65 { 66 CMethod::Resolve( resolver ); 67 return true; 68 } 69 37 70 38 71 Methods::Methods() -
trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp
r637 r639 17 17 _ASSERT( type == Schedule::ComVtbl || type == Schedule::Vtbl || type == Schedule::TypeInfo ); 18 18 return *pClass; 19 } 20 21 bool Schedule::Resolve( const ObjectModule &resolver ) 22 { 23 switch( type ) 24 { 25 case UserProc: 26 case AddressOf: 27 case CatchAddress: 28 if( pUserProc->IsNeedResolve() ) 29 { 30 pUserProc = resolver.meta.GetUserProcs().FindLike( pUserProc ); 31 } 32 break; 33 case DllProc: 34 if( pDllProc->IsNeedResolve() ) 35 { 36 pDllProc = resolver.meta.GetDllProcs().FindLike( pDllProc ); 37 } 38 break; 39 case ComVtbl: 40 case Vtbl: 41 case TypeInfo: 42 if( pClass->IsNeedResolve() ) 43 { 44 pClass = resolver.meta.GetClasses().FindLike( pClass ); 45 } 46 break; 47 default: 48 break; 49 } 50 51 return true; 19 52 } 20 53 … … 158 191 } 159 192 160 void NativeCode::Resolve( )193 void NativeCode::Resolve( const ObjectModule &resolver ) 161 194 { 162 // TODO: Resolve 195 BOOST_FOREACH( Schedule &schedule, schedules ) 196 { 197 schedule.Resolve( resolver ); 198 } 163 199 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp
r637 r639 87 87 void ObjectModule::Resolve() 88 88 { 89 this->meta.Resolve( );89 this->meta.Resolve( *this ); 90 90 91 91 // グローバルネイティブコードを解決(スケジュールを解決する) 92 this->globalNativeCode.Resolve( );92 this->globalNativeCode.Resolve( *this ); 93 93 94 94 // データテーブルを解決(スケジュールを解決する) 95 this->dataTable.Resolve( );95 this->dataTable.Resolve( *this ); 96 96 } 97 97 -
trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp
r637 r639 11 11 } 12 12 } 13 14 bool Procedure::Resolve( const ObjectModule &resolver ) 15 { 16 BOOST_FOREACH( Parameter *pParameter, params ) 17 { 18 pParameter->Resolve( resolver ); 19 } 20 21 returnType.Resolve( resolver ); 22 23 return true; 24 } 25 13 26 14 27 void UserProc::ResetRelationalObjectModuleIndex( const std::vector<int> &relationTable ) … … 157 170 } 158 171 159 bool UserProc::Resolve() 160 { 161 // TODO: Resolve 172 bool UserProc::Resolve( const ObjectModule &resolver ) 173 { 174 Procedure::Resolve( resolver ); 175 176 if( pParentClass ) 177 { 178 if( pParentClass->IsNeedResolve() ) 179 { 180 pParentClass = resolver.meta.GetClasses().FindLike( pParentClass ); 181 } 182 } 183 184 if( pInterface ) 185 { 186 const_cast<Interface *>(pInterface)->Resolve( resolver ); 187 } 188 189 if( pMethod ) 190 { 191 pMethod->Resolve( resolver ); 192 } 193 194 BOOST_FOREACH( Parameter *pParameter, realParams ) 195 { 196 pParameter->Resolve( resolver ); 197 } 198 199 BOOST_FOREACH( Variable *pLocalVar, localVars ) 200 { 201 pLocalVar->Resolve( resolver ); 202 } 203 204 nativeCode.Resolve( resolver ); 162 205 return true; 163 206 } … … 185 228 } 186 229 187 bool DllProc::Resolve( )188 { 189 // TODO: Resolve190 return true; 191 } 192 193 bool ProcPointer::Resolve( )194 { 195 // TODO: Resolve230 bool DllProc::Resolve( const ObjectModule &resolver ) 231 { 232 Procedure::Resolve( resolver ); 233 return true; 234 } 235 236 bool ProcPointer::Resolve( const ObjectModule &resolver ) 237 { 238 Procedure::Resolve( resolver ); 196 239 return true; 197 240 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Template.cpp
r632 r639 8 8 } 9 9 } 10 11 bool ExpandedTemplateClass::Resolve( const ObjectModule &resolver ) 12 { 13 if( pClass->IsNeedResolve() ) 14 { 15 pClass = const_cast<CClass *>(resolver.meta.GetClasses().FindLike( pClass )); 16 } 17 18 BOOST_FOREACH( Type &actualType, actualTypes ) 19 { 20 actualType.Resolve( resolver ); 21 } 22 23 return true; 24 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
r632 r639 554 554 if(name[i]=='%') return DEF_INTEGER; 555 555 return DEF_DOUBLE; 556 } 557 558 bool Type::Resolve( const ObjectModule &resolver ) 559 { 560 if( this->HasMember() ) 561 { 562 if( this->pClass->IsNeedResolve() ) 563 { 564 this->pClass = resolver.meta.GetClasses().FindLike( this->pClass ); 565 } 566 567 BOOST_FOREACH( GenericType &actualGenericType, actualGenericTypes ) 568 { 569 actualGenericType.GetType().Resolve( resolver ); 570 } 571 } 572 return true; 556 573 } 557 574 -
trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
r637 r639 8 8 } 9 9 10 bool TypeDef::Resolve( )10 bool TypeDef::Resolve( const ObjectModule &resolver ) 11 11 { 12 // TODO: Resolve12 this->baseType.Resolve( resolver ); 13 13 return true; 14 14 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Variable.cpp
r637 r639 28 28 } 29 29 30 bool Variable::Resolve( )30 bool Variable::Resolve( const ObjectModule &resolver ) 31 31 { 32 // TODO: Resolve32 this->type.Resolve( resolver ); 33 33 return true; 34 34 }
Note:
See TracChangeset
for help on using the changeset viewer.