Changeset 639 in dev for trunk/ab5.0/abdev
- Timestamp:
- Jun 12, 2008, 11:30:50 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp
r636 r639 202 202 } 203 203 204 ActiveBasic::Common::Environment::SetRemoveExternalMark( true ); 205 204 206 BOOST_FOREACH( const std::string &filePath, compiler.staticLibraryFilePaths ) 205 207 { … … 225 227 } 226 228 229 ActiveBasic::Common::Environment::SetRemoveExternalMark( false ); 230 227 231 if( !isSuccessfulLoadStaticLinkLibrary ) 228 232 { -
trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h
r637 r639 466 466 void GetReferenceOffsetsInitializeBuffer( std::string &referenceOffsetsBuffer, int &numOfReference, int baseOffset = 0 ) const; 467 467 468 virtual bool Resolve( );468 virtual bool Resolve( const ObjectModule &resolver ); 469 469 }; 470 470 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h
r637 r639 66 66 double GetDoubleData(); 67 67 68 virtual bool Resolve( );68 virtual bool Resolve( const ObjectModule &resolver ); 69 69 }; 70 70 class Consts : public Jenga::Common::Hashmap<CConst> … … 154 154 } 155 155 156 virtual bool Resolve( );156 virtual bool Resolve( const ObjectModule &resolver ); 157 157 }; 158 158 class ConstMacros -
trunk/ab5.0/abdev/ab_common/include/Lexical/DataTable.h
r637 r639 150 150 void ResetDataSectionBaseOffset( long dataSectionBaseOffset ); 151 151 152 void Resolve( );152 void Resolve( const ObjectModule &resolver ); 153 153 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Delegate.h
r637 r639 92 92 bool IsSimilar( const Delegate &dgt ) const; 93 93 94 virtual bool Resolve( );94 virtual bool Resolve( const ObjectModule &resolver ); 95 95 }; 96 96 typedef Jenga::Common::Hashmap<Delegate> Delegates; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h
r636 r639 91 91 92 92 std::string GetFullNameWithActualGenericTypeParameters() const; 93 94 virtual bool Resolve( const ObjectModule &resolver ); 93 95 }; 94 96 typedef std::vector<Interface *> Interfaces; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Member.h
r632 r639 76 76 return constructParameter; 77 77 } 78 79 virtual bool Resolve( const ObjectModule &resolver ); 78 80 }; 79 81 typedef std::vector<Member *> Members; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h
r637 r639 98 98 } 99 99 100 const Classes &GetClasses() const 101 { 102 return *pNowClassesForDebugger; 103 } 100 104 Classes &GetClasses() 101 105 { … … 158 162 const CClass *FindClassSupportedTypeDef( const Symbol &symbol ); 159 163 160 void Resolve( );164 void Resolve( const ObjectModule &resolver ); 161 165 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Method.h
r603 r639 48 48 virtual bool IsNotUse() const = 0; 49 49 virtual void SetNotUseMark( bool isNotUse ) = 0; 50 51 virtual bool Resolve( const ObjectModule &resolver ); 50 52 }; 51 53 … … 156 158 this->isNotUse = isNotUse; 157 159 } 160 161 virtual bool Resolve( const ObjectModule &resolver ); 158 162 }; 159 163 BOOST_CLASS_EXPORT( DynamicMethod ); … … 230 234 throw; 231 235 } 236 237 virtual bool Resolve( const ObjectModule &resolver ); 232 238 }; 233 239 BOOST_CLASS_EXPORT( StaticMethod ); -
trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h
r637 r639 116 116 const ::UserProc &GetUserProc() const; 117 117 const ::CClass &GetClass() const; 118 119 virtual bool Resolve( const ObjectModule &resolver ); 118 120 }; 119 121 typedef std::vector<Schedule> Schedules; … … 247 249 void ResetRelationalObjectModuleIndex( const std::vector<int> &relationTable ); 248 250 249 void Resolve( );251 void Resolve( const ObjectModule &resolver ); 250 252 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h
r637 r639 110 110 return returnType; 111 111 } 112 113 virtual bool Resolve( const ObjectModule &resolver ); 112 114 }; 113 115 … … 158 160 159 161 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure ); 162 ar & boost::serialization::make_nvp("pParentClass", const_cast<CClass *&>(pParentClass) ); 160 163 161 164 if( ActiveBasic::Common::Environment::IsRemoveExternal() ) … … 170 173 ar & BOOST_SERIALIZATION_NVP( _paramStr ); 171 174 ar & BOOST_SERIALIZATION_NVP( importedNamespaces ); 172 ar & boost::serialization::make_nvp("pParentClass", const_cast<CClass *&>(pParentClass) );173 175 ar & boost::serialization::make_nvp("pInterface", const_cast<Interface *&>(pInterface) ); 174 176 ar & BOOST_SERIALIZATION_NVP( pMethod ); … … 374 376 const CMethod &GetMethod() const; 375 377 376 virtual bool Resolve( );378 virtual bool Resolve( const ObjectModule &resolver ); 377 379 378 380 static const UserProc *pGlobalProc; … … 482 484 } 483 485 484 virtual bool Resolve( );486 virtual bool Resolve( const ObjectModule &resolver ); 485 487 }; 486 488 class DllProcs : public Jenga::Common::Hashmap<DllProc> … … 523 525 } 524 526 525 virtual bool Resolve( );527 virtual bool Resolve( const ObjectModule &resolver ); 526 528 }; 527 529 -
trunk/ab5.0/abdev/ab_common/include/Lexical/RelationalObjectModuleItem.h
r637 r639 1 1 #pragma once 2 3 class ObjectModule; 2 4 3 5 namespace ActiveBasic{ namespace Common{ namespace Lexical{ … … 66 68 } 67 69 68 virtual bool Resolve( ) = 0;70 virtual bool Resolve( const ObjectModule &resolver ) = 0; 69 71 }; 70 72 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Template.h
r632 r639 46 46 return actualTypes; 47 47 } 48 49 virtual bool Resolve( const ObjectModule &resolver ); 48 50 }; 49 51 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h
r637 r639 6 6 typedef std::vector<GenericType> GenericTypes; 7 7 8 class Type{ 8 class Type 9 { 9 10 int basicType; 10 11 union{ … … 229 230 std::string ToString() const; 230 231 232 virtual bool Resolve( const ObjectModule &resolver ); 233 231 234 232 235 private: … … 299 302 return type; 300 303 } 304 Type &GetType() 305 { 306 return type; 307 } 301 308 }; 302 309 -
trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h
r637 r639 51 51 } 52 52 53 virtual bool Resolve( );53 virtual bool Resolve( const ObjectModule &resolver ); 54 54 }; 55 55 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Variable.h
r637 r639 175 175 } 176 176 177 virtual bool Resolve( );177 virtual bool Resolve( const ObjectModule &resolver ); 178 178 179 179 -
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.