Changeset 380 in dev


Ignore:
Timestamp:
Dec 18, 2007, 2:51:10 AM (16 years ago)
Author:
dai_9181
Message:

Foreachに対応。
ジェネリクスインターフェイスに対応。

Location:
trunk/abdev
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler32/Compile_Statement.cpp

    r374 r380  
    600600    bool isError = false;
    601601
    602     //レキシカルスコープをレベルアップ
    603     compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_FOR );
    604 
    605602    //第1パラメータを取得
    606603    char variable[VN_SIZE];
     
    615612    i=GetOneParameter(Parameter,i,collectionVar);
    616613
     614    //レキシカルスコープをレベルアップ
     615    compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_FOR );
     616
    617617    if( !GetVarType( variable, resultType, false ) )
    618618    {
     
    626626        // 未定義の場合は自動的に定義する
    627627        sprintf(temporary,"%s%c%c%s", variable, 1, ESC_AS, collectionType.GetActualGenericType(0).GetClass().GetFullName().c_str() );
    628         MessageBox(0,temporary,"test",0);
    629628        OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR);
    630629    }
     
    653652
    654653    // Currentプロパティから現在の値を取得
    655     // TODO: 型指定が未完成
    656     sprintf( temporary, "%s=%s.Current As String", variable, collectionVar );
     654    sprintf( temporary, "%s=%s.Current", variable, collectionVar );
    657655    Compile( temporary );
    658656
  • trunk/abdev/BasicCompiler64/Compile_Statement.cpp

    r375 r380  
    490490    i=GetOneParameter(Parameter,i,collectionVar);
    491491
     492    //レキシカルスコープをレベルアップ
     493    compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_FOR );
     494
    492495    if( !GetVarType( variable, resultType, false ) )
    493496    {
     
    501504        // 未定義の場合は自動的に定義する
    502505        sprintf(temporary,"%s%c%c%s", variable, 1, ESC_AS, collectionType.GetActualGenericType(0).GetClass().GetFullName().c_str() );
    503         MessageBox(0,temporary,"test",0);
    504506        OpcodeDim(temporary,DIMFLAG_INITDEBUGVAR);
    505507    }
     
    525527    const PertialSchedule *pTempPertialSchedule = compiler.codeGenerator.op_je( 0, sizeof(long), true );
    526528
    527     //レキシカルスコープをレベルアップ
    528     compiler.codeGenerator.lexicalScopes.Start( compiler.codeGenerator.GetNativeCodeSize(), LexicalScope::SCOPE_TYPE_FOR );
    529 
    530529    // Currentプロパティから現在の値を取得
    531     // TODO: 型指定が未完成
    532     sprintf( temporary, "%s=%s.Current As String", variable, collectionVar );
     530    sprintf( temporary, "%s=%s.Current", variable, collectionVar );
    533531    Compile( temporary );
    534532
  • trunk/abdev/BasicCompiler_Common/include/ver.h

    r371 r380  
    66// バージョン付加文字列
    77#ifdef _AMD64_
    8 #define VER_INFO        "(x64) (rev.382)"
     8#define VER_INFO        "(x64) (rev.396)"
    99#else
    10 #define VER_INFO        "(rev.382)"
     10#define VER_INFO        "(rev.396)"
    1111#endif
  • trunk/abdev/BasicCompiler_Common/src/Class.cpp

    r379 r380  
    12271227    }
    12281228
     1229    std::vector<const CClass *> classes;
    12291230    const CClass *pClass = GetHashArrayElement( name.c_str() );
    12301231    while( pClass )
     
    12321233        if( pClass->IsEqualSymbol( namespaceScopes, name ) ){
    12331234            //名前空間とクラス名が一致した
    1234             return pClass;
     1235            classes.push_back( pClass );
    12351236        }
    12361237        pClass = pClass->GetChainNext();
     1238    }
     1239    if( classes.size() > 0 )
     1240    {
     1241        // 複数の名前空間の中に同一のクラス名が存在する場合があるので、アクセス可能で尚且つ階層が一番深いものをチョイスする
     1242        pClass = classes.front();
     1243
     1244        BOOST_FOREACH( const CClass *pTempClass, classes )
     1245        {
     1246            if( pClass->GetNamespaceScopes().size() < pTempClass->GetNamespaceScopes().size() )
     1247            {
     1248                pClass = pTempClass;
     1249            }
     1250        }
     1251
     1252        return pClass;
    12371253    }
    12381254
  • trunk/abdev/ProjectEditor/Common.h

    r367 r380  
    6666#define APPLICATION_NAME "ActiveBasic 5.0"
    6767#define VERSION_APPLI_NAME APPLICATION_NAME
    68 #define VERSION_STRING "5.00.00 (rev.379)"
     68#define VERSION_STRING "5.00.00 (rev.396)"
    6969
    7070#endif
  • trunk/abdev/ProjectEditor/EndPairCommandComplement.cpp

    r366 r380  
    7171    if(lstrcmpi(temporary,"Enum")==0) return COM_ENUM;
    7272    if(lstrcmpi(temporary,"For")==0) return COM_FOR;
     73    if(lstrcmpi(temporary,"Foreach")==0) return COM_FOR;
    7374    if(lstrcmpi(temporary,"Function")==0) return COM_FUNCTION;
    7475    if(lstrcmpi(temporary,"Namespace")==0) return COM_NAMESPACE;
  • trunk/abdev/ProjectEditor/SubOperation.cpp

    r364 r380  
    512512        if(lstrcmpi(str,"Finally")==0) return -1;
    513513        if(lstrcmpi(str,"For")==0) return COM_FOR;
     514        if(lstrcmpi(str,"Foreach")==0) return -1;
    514515        if(lstrcmpi(str,"Function")==0) return COM_FUNCTION;
    515516    }
  • trunk/abdev/ProjectEditor/TextEditor_KeyEvent.cpp

    r366 r380  
    7070        lstrcmpi(temporary,"Enum")==0||
    7171        lstrcmpi(temporary,"For")==0||
     72        lstrcmpi(temporary,"Foreach")==0||
    7273        lstrcmpi(temporary,"Function")==0||
    7374        lstrcmpi(temporary,"Namespace")==0||
Note: See TracChangeset for help on using the changeset viewer.