Changeset 750 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src
- Timestamp:
- Sep 24, 2008, 2:02:16 AM (16 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common/src
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/BreakPoint.cpp
r743 r750 37 37 38 38 extern BasicSources sourcesLinkRelationalObjectModule; 39 BOOST_FOREACH( const BasicSource &source, sourcesLinkRelationalObjectModule )39 foreach( const BasicSource &source, sourcesLinkRelationalObjectModule ) 40 40 { 41 41 pIncludedFilesRelation = &source.GetIncludedFilesRelation(); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp
r551 r750 28 28 void CodeGenerator::ResolveExitSubSchedule() 29 29 { 30 BOOST_FOREACH( long exitSubCodePosition, exitSubCodePositions )30 foreach( long exitSubCodePosition, exitSubCodePositions ) 31 31 { 32 32 pNativeCode->Overwrite( exitSubCodePosition, (long)( pNativeCode->GetSize()-(exitSubCodePosition+sizeof(long)) ) ); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp
r745 r750 24 24 Compiler::~Compiler() 25 25 { 26 BOOST_FOREACH( ObjectModule *pStaticLibrary, staticLibraries )26 foreach( ObjectModule *pStaticLibrary, staticLibraries ) 27 27 { 28 28 delete pStaticLibrary; … … 33 33 void Compiler::PreStaticLink( const ObjectModules &staticLibraries ) 34 34 { 35 BOOST_FOREACH( const ObjectModule *pStaticLibrary, staticLibraries )35 foreach( const ObjectModule *pStaticLibrary, staticLibraries ) 36 36 { 37 37 // 関連オブジェクトモジュールの名前リスト … … 41 41 void Compiler::StaticLink( ObjectModules &staticLibraries ) 42 42 { 43 BOOST_FOREACH( ObjectModule *pStaticLibrary, staticLibraries )43 foreach( ObjectModule *pStaticLibrary, staticLibraries ) 44 44 { 45 45 if( &this->GetObjectModule() == pStaticLibrary ) … … 160 160 // 仮型パラメータを実型パラメータに変換 161 161 Types actualTypes; 162 BOOST_FOREACH( const GenericType &genericType, genericTypes )162 foreach( const GenericType &genericType, genericTypes ) 163 163 { 164 164 actualTypes.push_back( genericType.GetType() ); … … 378 378 // テンプレート展開済みのクラスの場合 379 379 std::string actualGenericTypesName; 380 BOOST_FOREACH( const Type &typeParameter, type.GetClass().expandedClassActualTypeParameters )380 foreach( const Type &typeParameter, type.GetClass().expandedClassActualTypeParameters ) 381 381 { 382 382 if( actualGenericTypesName.size() ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/DataTableGenerator.cpp
r745 r750 28 28 //dataTable.schedules.push_back( Schedule( Schedule::TypeInfo, &objClass, dataTableOffset + offsetForTypeInfo ) ); 29 29 30 BOOST_FOREACH( const std::string &initMemberValue, initMemberValues )30 foreach( const std::string &initMemberValue, initMemberValues ) 31 31 { 32 32 int i = 0; … … 207 207 bool isSuccessful = true; 208 208 int i = 0; 209 BOOST_FOREACH( const std::string ¶mStr, parameters )209 foreach( const std::string ¶mStr, parameters ) 210 210 { 211 211 if( paramStr.size() == 0 ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Exception.cpp
r745 r750 50 50 void ResolveJmpFinally() 51 51 { 52 BOOST_FOREACH( const PertialSchedule *pPertialSchedule, finallySchedules )52 foreach( const PertialSchedule *pPertialSchedule, finallySchedules ) 53 53 { 54 54 compiler.codeGenerator.opfix_JmpPertialSchedule( pPertialSchedule ); … … 192 192 193 193 int pos = 0; 194 BOOST_FOREACH( const CatchScope &catchScope, catchScopes )194 foreach( const CatchScope &catchScope, catchScopes ) 195 195 { 196 196 // パラメータのクラス名 … … 214 214 215 215 pos = 0; 216 BOOST_FOREACH( const CatchScope &catchScope, catchScopes )216 foreach( const CatchScope &catchScope, catchScopes ) 217 217 { 218 218 // パラメータのクラス名 -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp
r732 r750 208 208 209 209 bool result = true; 210 BOOST_FOREACH( Member *pMember, objClass.GetDynamicMembers() ){210 foreach( Member *pMember, objClass.GetDynamicMembers() ){ 211 211 if(pMember->GetType().IsStruct()){ 212 212 //循環参照でないかをチェック … … 332 332 333 333 //メソッド 334 BOOST_FOREACH( const CMethod *pMethod, pobj_c->GetDynamicMethods() )334 foreach( const CMethod *pMethod, pobj_c->GetDynamicMethods() ) 335 335 { 336 336 //基底クラスと重複する場合はオーバーライドを行う … … 363 363 { 364 364 // インターフェイス メソッドのオーバーライド 365 BOOST_FOREACH( ::Interface *pInterface, pobj_c->GetInterfaces() )365 foreach( ::Interface *pInterface, pobj_c->GetInterfaces() ) 366 366 { 367 367 if( interfaceName[0] ) … … 438 438 // 型パラメータ文字列から型データを取得 439 439 Types actualTypeParameters; 440 BOOST_FOREACH( const std::string &typeParameterStr, typeParameterStrings )440 foreach( const std::string &typeParameterStr, typeParameterStrings ) 441 441 { 442 442 Type type; … … 517 517 { 518 518 // まずは継承されたインターフェイスを実装する 519 BOOST_FOREACH( ::Interface *pInheritsInterface, pInterface->GetClass().GetInterfaces() )519 foreach( ::Interface *pInheritsInterface, pInterface->GetClass().GetInterfaces() ) 520 520 { 521 521 // TODO: actualTypeParametersの引渡し … … 532 532 // 基底クラスのメソッドからインターフェイスメソッドを再実装する 533 533 ///////////////////////////////////////////////////////////////// 534 BOOST_FOREACH( CMethod *pMethod, _class.GetDynamicMethods() )534 foreach( CMethod *pMethod, _class.GetDynamicMethods() ) 535 535 { 536 536 DynamicMethod *pMethodForOverride = pInterface->GetDynamicMethods().FindForOverride( pInterface->GetActualTypeParameters(), &pMethod->GetUserProc() ); … … 612 612 SplitParameter( interfaceNames, paramStrs ); 613 613 614 BOOST_FOREACH( const std::string ¶mStr, paramStrs )614 foreach( const std::string ¶mStr, paramStrs ) 615 615 { 616 616 char className[VN_SIZE]; … … 619 619 620 620 Types actualTypeParameters; 621 BOOST_FOREACH( const std::string &typeParameterStr, typeParameterStrings )621 foreach( const std::string &typeParameterStr, typeParameterStrings ) 622 622 { 623 623 Type type; … … 821 821 // 型パラメータ文字列から型データを取得 822 822 Types actualTypeParameters; 823 BOOST_FOREACH( const std::string &typeParameterStr, typeParameterStrings )823 foreach( const std::string &typeParameterStr, typeParameterStrings ) 824 824 { 825 825 Type type; … … 1389 1389 1390 1390 // パラメータのジェネリック型を解決 1391 BOOST_FOREACH( const Parameter *pParam, pBaseMethod->GetUserProc().Params() )1391 foreach( const Parameter *pParam, pBaseMethod->GetUserProc().Params() ) 1392 1392 { 1393 1393 Type type = pParam->IsTypeParameter() … … 1398 1398 pUserProc->GetParameters().push_back( new Parameter( *pParam, type ) ); 1399 1399 } 1400 BOOST_FOREACH( const Parameter *pParam, pBaseMethod->GetUserProc().RealParams() )1400 foreach( const Parameter *pParam, pBaseMethod->GetUserProc().RealParams() ) 1401 1401 { 1402 1402 Type type = pParam->IsTypeParameter() … … 1440 1440 // 実型パラメータに値型が含まれないとき 1441 1441 bool isValueType = false; 1442 BOOST_FOREACH( const Type &actualType, actualTypes )1442 foreach( const Type &actualType, actualTypes ) 1443 1443 { 1444 1444 if( actualType.IsValueType() ) … … 1453 1453 1454 1454 // 展開済みのクラスがあればそれを返す 1455 BOOST_FOREACH( const ExpandedTemplateClass *pExpandedTemplateClass, _class.expandedTemplateClasses )1455 foreach( const ExpandedTemplateClass *pExpandedTemplateClass, _class.expandedTemplateClasses ) 1456 1456 { 1457 1457 if( pExpandedTemplateClass->GetActualTypes().IsEquals( actualTypes ) ) … … 1487 1487 { 1488 1488 Types expandedSuperClassActualTypes; 1489 BOOST_FOREACH( const Type &superClassActualType, _class.GetSuperClassActualTypeParameters() )1489 foreach( const Type &superClassActualType, _class.GetSuperClassActualTypeParameters() ) 1490 1490 { 1491 1491 expandedSuperClassActualTypes.push_back( TemplateExpand_ResolveType( superClassActualType, actualTypes ) ); … … 1497 1497 1498 1498 // インターフェイスのジェネリック型を解決 1499 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() )1499 foreach( const ::Interface *pInterface, _class.GetInterfaces() ) 1500 1500 { 1501 1501 const CClass *pExpandedInterfaceClass = TemplateExpand( *const_cast<CClass *>(&pInterface->GetClass()), actualTypes ); … … 1504 1504 1505 1505 // インターフェイス メソッドのジェネリック型を解決 1506 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() )1506 foreach( const CMethod *pMethod, pInterface->GetDynamicMethods() ) 1507 1507 { 1508 1508 if( pMethod->GetUserProc().GetParentClassPtr() == &_class ) … … 1533 1533 1534 1534 // メンバのジェネリック型を解決 1535 BOOST_FOREACH( const Member *pMember, _class.GetDynamicMembers() )1535 foreach( const Member *pMember, _class.GetDynamicMembers() ) 1536 1536 { 1537 1537 Type type = pMember->GetType(); … … 1549 1549 1550 1550 // クラス メソッドのジェネリック型を解決 1551 BOOST_FOREACH( const CMethod *pMethod, _class.GetDynamicMethods() )1551 foreach( const CMethod *pMethod, _class.GetDynamicMethods() ) 1552 1552 { 1553 1553 if( pMethod->GetUserProc().GetParentClassPtr() == &_class ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Delegate.cpp
r735 r750 144 144 std::string namespaceScopesCommandStr; 145 145 std::string endNamespaceScopesCommandStr; 146 BOOST_FOREACH( const std::string &namespaceStr, dg.GetNamespaceScopes() )146 foreach( const std::string &namespaceStr, dg.GetNamespaceScopes() ) 147 147 { 148 148 if( namespaceScopesCommandStr.size() ) … … 205 205 LexicalAnalyzer::ExtractParameterVarNames( dg.GetParamStr().c_str(), paramVarNames, dg.GetSourceIndex() ); 206 206 std::string tempParamStrForCall; 207 BOOST_FOREACH( const std::string &varName, paramVarNames )207 foreach( const std::string &varName, paramVarNames ) 208 208 { 209 209 if( !tempParamStrForCall.empty() ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Enum.cpp
r715 r750 160 160 buffer.reserve(65536); 161 161 162 BOOST_FOREACH( const EnumInfo &enumInfo, enums )162 foreach( const EnumInfo &enumInfo, enums ) 163 163 { 164 BOOST_FOREACH( const std::string &namespaceStr, enumInfo.GetNamespaceScopes() ){164 foreach( const std::string &namespaceStr, enumInfo.GetNamespaceScopes() ){ 165 165 buffer.append("Namespace ").append(namespaceStr) += '\n'; 166 166 } … … 179 179 buffer.append("\tEnd Sub\n"); 180 180 181 BOOST_FOREACH( const EnumMember &member, enumInfo.GetMembers() )181 foreach( const EnumMember &member, enumInfo.GetMembers() ) 182 182 { 183 183 buffer.append("\tStatic ") … … 190 190 buffer.append("End Class\n"); 191 191 192 BOOST_FOREACH( const std::string &namespaceStr, enumInfo.GetNamespaceScopes() ){192 foreach( const std::string &namespaceStr, enumInfo.GetNamespaceScopes() ){ 193 193 buffer.append("End Namespace\n"); 194 194 } -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Procedure.cpp
r710 r750 120 120 121 121 //パラメータ 122 BOOST_FOREACH( const std::string ¶mStr, parameterStrings )122 foreach( const std::string ¶mStr, parameterStrings ) 123 123 { 124 124 int i = 0; … … 384 384 385 385 //パラメータをコピー 386 BOOST_FOREACH( Parameter *pParam, userProc.GetParameters() ){386 foreach( Parameter *pParam, userProc.GetParameters() ){ 387 387 userProc.RealParams().push_back( new Parameter( *pParam ) ); 388 388 } … … 733 733 { 734 734 ::Interface *pTargetInterface = NULL; 735 BOOST_FOREACH( ::Interface *pInterface, pobj_c->GetInterfaces() )735 foreach( ::Interface *pInterface, pobj_c->GetInterfaces() ) 736 736 { 737 737 if( pInterface->GetClass().GetName() == interfaceName ) … … 855 855 856 856 // パラメータのエラーチェック 857 BOOST_FOREACH( const Parameter *pParam, pDllProc->Params() ){857 foreach( const Parameter *pParam, pDllProc->Params() ){ 858 858 if( pParam->IsObject() ){ 859 859 compiler.errorMessenger.Output(25,pParam->GetVarName(),nowLine); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalScope.cpp
r677 r750 23 23 } 24 24 void LexicalScope::RunScheduleOfBreak(){ 25 BOOST_FOREACH( const PertialSchedule *pBreakPertialSchedule, breakPertialSchedules )25 foreach( const PertialSchedule *pBreakPertialSchedule, breakPertialSchedules ) 26 26 { 27 27 compiler.codeGenerator.opfix_JmpPertialSchedule( pBreakPertialSchedule ); … … 76 76 77 77 //使用済みローカル変数の生存チェックを外す 78 BOOST_FOREACH( Variable *pVar, (*pVars) )78 foreach( Variable *pVar, (*pVars) ) 79 79 { 80 80 if( pVar->isLiving && pVar->GetScopeLevel() == level ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Linker.cpp
r587 r750 7 7 void Linker::ResolveDataTableSchedules( long dataSectionBaseOffset ) 8 8 { 9 BOOST_FOREACH( const Schedule &schedule, nativeCode.GetSchedules() )9 foreach( const Schedule &schedule, nativeCode.GetSchedules() ) 10 10 { 11 11 if( schedule.GetType() == Schedule::DataTable ) … … 18 18 } 19 19 20 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules )20 foreach( const Schedule &schedule, dataTable.schedules ) 21 21 { 22 22 if( schedule.GetType() == Schedule::DataTable ) … … 40 40 void Linker::ResolveCatchAddressSchedules( long codeSectionBaseOffset ) 41 41 { 42 BOOST_FOREACH( const Schedule &schedule, nativeCode.GetSchedules() )42 foreach( const Schedule &schedule, nativeCode.GetSchedules() ) 43 43 { 44 44 if( schedule.GetType() == Schedule::CatchAddress ) … … 55 55 } 56 56 57 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules )57 foreach( const Schedule &schedule, dataTable.schedules ) 58 58 { 59 59 if( schedule.GetType() == Schedule::CatchAddress ) … … 81 81 void Linker::ResolveDllProcSchedules( long codeSectionBaseOffset, long importSectionBaseOffset, long lookupSize, long hintSize ) 82 82 { 83 BOOST_FOREACH( const Schedule &schedule, nativeCode.GetSchedules() )83 foreach( const Schedule &schedule, nativeCode.GetSchedules() ) 84 84 { 85 85 if( schedule.GetType() == Schedule::DllProc ) … … 105 105 void Linker::ResolveUserProcSchedules( long codeSectionBaseOffset ) 106 106 { 107 BOOST_FOREACH( const Schedule &schedule, nativeCode.GetSchedules() )107 foreach( const Schedule &schedule, nativeCode.GetSchedules() ) 108 108 { 109 109 if( schedule.GetType() == Schedule::UserProc … … 139 139 int allInitVarSize = compiler.GetObjectModule().meta.GetGlobalVars().initAreaBuffer.GetSize(); 140 140 141 BOOST_FOREACH( const Schedule &schedule, nativeCode.GetSchedules() )141 foreach( const Schedule &schedule, nativeCode.GetSchedules() ) 142 142 { 143 143 if( schedule.GetType() == Schedule::GlobalVar ) … … 163 163 void Linker::ResolveVtblSchedule( long dataSectionBaseOffset ) 164 164 { 165 BOOST_FOREACH( const Schedule &schedule, nativeCode.GetSchedules() )165 foreach( const Schedule &schedule, nativeCode.GetSchedules() ) 166 166 { 167 167 if( schedule.GetType() == Schedule::ComVtbl ) … … 186 186 } 187 187 188 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules )188 foreach( const Schedule &schedule, dataTable.schedules ) 189 189 { 190 190 if( schedule.GetType() == Schedule::ComVtbl ) … … 226 226 void Linker::ResolveTypeInfoSchedule( long dataSectionBaseOffset ) 227 227 { 228 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules )228 foreach( const Schedule &schedule, dataTable.schedules ) 229 229 { 230 230 if( schedule.GetType() == Schedule::TypeInfo ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/Messenger.cpp
r719 r750 409 409 { 410 410 int count = 0; 411 BOOST_FOREACH( const ErrorInfo &errorInfo, errorInfos )411 foreach( const ErrorInfo &errorInfo, errorInfos ) 412 412 { 413 413 if( !errorInfo.IsWarning() ) … … 425 425 { 426 426 int count = 0; 427 BOOST_FOREACH( const ErrorInfo &errorInfo, errorInfos )427 foreach( const ErrorInfo &errorInfo, errorInfos ) 428 428 { 429 429 if( errorInfo.IsWarning() ) … … 438 438 { 439 439 const ErrorInfo *pErrorInfo = NULL; 440 BOOST_FOREACH( const ErrorInfo &errorInfo, errorInfos )440 foreach( const ErrorInfo &errorInfo, errorInfos ) 441 441 { 442 442 if( errorInfo.GetErrorLineNum() == errorLineNum ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/ProcedureGenerator.cpp
r637 r750 47 47 48 48 int i=0; 49 BOOST_FOREACH( Member *member, objClass.GetStaticMembers() )49 foreach( Member *member, objClass.GetStaticMembers() ) 50 50 { 51 51 if( pEnumInfo ) … … 122 122 std::string result; 123 123 124 BOOST_FOREACH( const Member *pMember, _class.GetDynamicMembers() )124 foreach( const Member *pMember, _class.GetDynamicMembers() ) 125 125 { 126 126 if( result.size() ) -
trunk/ab5.0/abdev/BasicCompiler_Common/src/VtblGenerator.cpp
r632 r750 9 9 //関数テーブルに値をセット 10 10 int i2 = 0; 11 BOOST_FOREACH( const CMethod *pMethod, methods )11 foreach( const CMethod *pMethod, methods ) 12 12 { 13 13 if(pMethod->IsVirtual()){ … … 66 66 67 67 // インターフェイスのvtblを生成 68 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() )68 foreach( const ::Interface *pInterface, _class.GetInterfaces() ) 69 69 { 70 70 int tempVtblOffset = GenerateVTablePart( pInterface->GetDynamicMethods() ); … … 100 100 101 101 // テンプレート展開されたクラスも 102 BOOST_FOREACH( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, pClass->expandedTemplateClasses )102 foreach( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, pClass->expandedTemplateClasses ) 103 103 { 104 104 if( !pExpandedTemplateClass->GetClass().expandedTemplateClasses.empty() ) … … 149 149 150 150 // インターフェイスのvtbl 151 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() )151 foreach( const ::Interface *pInterface, _class.GetInterfaces() ) 152 152 { 153 153 LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule().dataTable.GetPtr() + pInterface->GetVtblOffset()); … … 184 184 185 185 // テンプレート展開されたクラスも 186 BOOST_FOREACH( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, pClass->expandedTemplateClasses )186 foreach( ActiveBasic::Common::Lexical::ExpandedTemplateClass *pExpandedTemplateClass, pClass->expandedTemplateClasses ) 187 187 { 188 188 if( !pExpandedTemplateClass->GetClass().expandedTemplateClasses.empty() )
Note:
See TracChangeset
for help on using the changeset viewer.