Ignore:
Timestamp:
Feb 11, 2011, 10:05:14 PM (14 years ago)
Author:
イグトランス (egtra)
Message:

Hashmapの実装にunorderedを用いるよう変更

Location:
branches/egtra/ab5.0/abdev/BasicCompiler_Common/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Class.cpp

    r750 r803  
    13481348    delete pobj_LoopRefCheck;
    13491349    pobj_LoopRefCheck=0;
    1350 
    1351     // イテレータの準備
    1352     classes.Iterator_Init();
    13531350}
    13541351
     
    14121409
    14131410    compiler.GetObjectModule().meta.GetUserProcs().Put( pUserProc );
    1414     compiler.GetObjectModule().meta.GetUserProcs().Iterator_Init();
    14151411
    14161412    LexicalAnalyzer::AddMethod(
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Const.cpp

    r637 r803  
    206206        }
    207207    }
    208 
    209     // イテレータを初期化
    210     compiler.GetObjectModule().meta.GetGlobalConsts().Iterator_Init();
    211     compiler.GetObjectModule().meta.GetGlobalConstMacros().Iterator_Init();
    212208}
    213209
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Delegate.cpp

    r750 r803  
    127127    Jenga::Common::SourceTemplate sourceTemplate( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\templates\\delegate_class.tab" );
    128128
    129     delegates.Iterator_Reset();
    130     while( delegates.Iterator_HasNext() )
    131     {
    132         const Delegate &dg = *delegates.Iterator_GetNext();
     129    foreach (auto pDelegate, delegates)
     130    {
     131        const Delegate &dg = *pDelegate;
    133132
    134133        if( dg.IsExternal() )
     
    263262void LexicalAnalyzer::RefleshDelegatesParameterAndReturnType( Delegates &delegates )
    264263{
    265     delegates.Iterator_Reset();
    266     while( delegates.Iterator_HasNext() )
    267     {
    268         Delegate &dg = *delegates.Iterator_GetNext();
    269         RefleshDelegateParameterAndReturnType( dg );
    270     }
    271 }
     264    foreach (auto *pDelegate, delegates)
     265    {
     266        RefleshDelegateParameterAndReturnType(*pDelegate);
     267    }
     268}
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/Linker.cpp

    r750 r803  
    257257    nativeCode.PutEx( masterObjectModule.globalNativeCode );
    258258
    259     masterObjectModule.meta.GetUserProcs().Iterator_Reset();
    260     while( masterObjectModule.meta.GetUserProcs().Iterator_HasNext() )
    261     {
    262         const UserProc *pUserProc = masterObjectModule.meta.GetUserProcs().Iterator_GetNext();
    263 
     259    foreach (auto pUserProc, masterObjectModule.meta.GetUserProcs())
     260    {
    264261        if( pUserProc->GetNativeCode().GetSize() > 0 )
    265262        {
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/ProcedureGenerator.cpp

    r750 r803  
    1818    int back_cp=cp;
    1919
    20     classes.Iterator_Reset();
    21     while(classes.Iterator_HasNext()){
    22         CClass &objClass = *classes.Iterator_GetNext();
     20    foreach(auto pClass, classes)
     21    {
     22        CClass &objClass = *pClass;
    2323        if( objClass.IsExternal() )
    2424        {
     
    8383    ////////////////////////////////////////////////////////////////////
    8484
    85     // イテレータをリセット
    86     classes.Iterator_Reset();
    87 
    88     while( classes.Iterator_HasNext() ){
    89         const CClass &objClass = *classes.Iterator_GetNext();
     85    foreach (auto pClass, classes)
     86    {
     87        const CClass &objClass = *pClass;
    9088
    9189        if( !objClass.IsUsing() ){
     
    152150    ChangeOpcode( temporary );
    153151
    154     // イテレータをリセット
    155     classes.Iterator_Reset();
    156 
    157     while( classes.Iterator_HasNext() ){
    158         const CClass &objClass = *classes.Iterator_GetNext();
     152    foreach (auto pClass, classes)
     153    {
     154        const CClass &objClass = *pClass;
    159155
    160156        if( !objClass.IsUsing() ){
  • branches/egtra/ab5.0/abdev/BasicCompiler_Common/src/VtblGenerator.cpp

    r750 r803  
    9393void VtblGenerator::GenerateVTablesForAllClasses( Classes &classes )
    9494{
    95     classes.Iterator_Reset();
    96     while( classes.Iterator_HasNext() )
     95    foreach (auto pClass, classes)
    9796    {
    98         CClass *pClass = classes.Iterator_GetNext();
    9997        GenerateFullVTables( *pClass );
    10098
     
    177175void VtblGenerator::ActionVtblScheduleForAllClasses( Classes &classes, LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection, LONG_PTR MemPos_DataSection )
    178176{
    179     classes.Iterator_Reset();
    180     while( classes.Iterator_HasNext() )
     177    foreach(auto pClass, classes)
    181178    {
    182         CClass *pClass = classes.Iterator_GetNext();
    183179        ActionVtblSchedule( *pClass, ImageBase, MemPos_CodeSection, MemPos_DataSection );
    184180
Note: See TracChangeset for help on using the changeset viewer.