Changeset 90 in dev for BasicCompiler32


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

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

Location:
BasicCompiler32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler32/Compile_Object.cpp

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

    r89 r90  
    204204        obp+=31;
    205205    }
    206     else if( userProc.GetName() == "InitializeUserTypes"
     206    else{
     207        SetError();
     208    }
     209}
     210void AutoGeneration(UserProc &userProc){
     211    if( userProc.GetName() == "InitializeUserTypes"
    207212        && userProc.HasParentClass()
    208213        && (string)userProc.GetParentClass().name == "_System_TypeBase" ){
     
    540545    //////////////////////////////////////////
    541546    ////// プロシージャ内をコンパイル ////////
    542     if(pUserProc->IsMacro()) CompileBuffer(ESC_ENDMACRO,0);
     547    if( pUserProc->IsAutoGeneration() ){
     548        AutoGeneration( *pUserProc );
     549    }
    543550    else{
    544         if(pUserProc->IsSub()) CompileBuffer(ESC_ENDSUB,0);
    545         else if(pUserProc->IsFunction()) CompileBuffer(ESC_ENDFUNCTION,0);
     551        if(pUserProc->IsMacro()){
     552            CompileBuffer(ESC_ENDMACRO,0);
     553        }
     554        else{
     555            if(pUserProc->IsSub()){
     556                CompileBuffer(ESC_ENDSUB,0);
     557            }
     558            else if(pUserProc->IsFunction()){
     559                CompileBuffer(ESC_ENDFUNCTION,0);
     560            }
     561        }
    546562    }
    547563    //////////////////////////////////////////
  • BasicCompiler32/MakePeHdr.cpp

    r88 r90  
    249249    if( pSubStaticMethod_System_TypeBase_InitializeUserTypes = GetSubHash( "_System_TypeBase.InitializeUserTypes",1 ) ){
    250250        pSubStaticMethod_System_TypeBase_InitializeUserTypes->Using();
    251         pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsSystemProc();
     251        pSubStaticMethod_System_TypeBase_InitializeUserTypes->ThisIsAutoGenerationProc();
    252252    }
    253253
Note: See TracChangeset for help on using the changeset viewer.