Changeset 90 in dev for BasicCompiler64


Ignore:
Timestamp:
Apr 7, 2007, 3:02:29 PM (17 years ago)
Author:
dai_9181
Message:

実行時型情報の生成にほぼ対応した。

Location:
BasicCompiler64
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Object.cpp

    r75 r90  
    4848        pUserProc,
    4949        PROCFLAG_NEW,"",0);
     50
     51    {
     52        // 動的型情報をセットする
     53        // obj._System_SetType( _System_TypeBase.Search( strNamespace, name ) )
     54        subs.clear();
     55        pobj_c->EnumMethod( "_System_SetType", subs );
     56        if( subs.size() == 1 ){
     57            char temporary[VN_SIZE];
     58            sprintf( temporary, "_System_TypeBase.Search(\"\",\"%s\"))", pobj_c->name );
     59
     60            Opcode_CallProc(temporary,
     61                subs[0],
     62                PROCFLAG_NEW,"",0);
     63        }
     64        else{
     65            SetError();
     66        }
     67    }
    5068
    5169    if(bSomeObjects){
  • BasicCompiler64/Compile_ProcOp.cpp

    r89 r90  
    195195        obp+=31;
    196196    }
    197     else if( userProc.GetName() == "InitializeUserTypes"
     197    else{
     198        SetError();
     199    }
     200}
     201void AutoGeneration(UserProc &userProc){
     202    if( userProc.GetName() == "InitializeUserTypes"
    198203        && userProc.HasParentClass()
    199204        && (string)userProc.GetParentClass().name == "_System_TypeBase" ){
     
    591596    //////////////////////////////////////////
    592597    ////// プロシージャ内をコンパイル ////////
    593     if(pUserProc->IsMacro()) CompileBuffer(ESC_ENDMACRO,0);
     598    if( pUserProc->IsAutoGeneration() ){
     599        AutoGeneration( *pUserProc );
     600    }
    594601    else{
    595         if(pUserProc->IsSub()) CompileBuffer(ESC_ENDSUB,0);
    596         else if(pUserProc->IsFunction()) CompileBuffer(ESC_ENDFUNCTION,0);
     602        if(pUserProc->IsMacro()){
     603            CompileBuffer(ESC_ENDMACRO,0);
     604        }
     605        else{
     606            if(pUserProc->IsSub()){
     607                CompileBuffer(ESC_ENDSUB,0);
     608            }
     609            else if(pUserProc->IsFunction()){
     610                CompileBuffer(ESC_ENDFUNCTION,0);
     611            }
     612        }
    597613    }
    598614    //////////////////////////////////////////
  • BasicCompiler64/MakePeHdr.cpp

    r89 r90  
    230230    if( pSubStaticMethod_System_TypeBase_InitializeUserTypes = GetSubHash( "_System_TypeBase.InitializeUserTypes",1 ) ){
    231231        pSubStaticMethod_System_TypeBase_InitializeUserTypes->Using();
    232         pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsSystemProc();
     232        pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsAutoGenerationProc();
    233233    }
    234234
Note: See TracChangeset for help on using the changeset viewer.