Changeset 91 in dev for BasicCompiler32/Compile_ProcOp.cpp


Ignore:
Timestamp:
Apr 7, 2007, 10:07:26 PM (18 years ago)
Author:
dai_9181
Message:

ログ機構(Smoothie::Logger)を導入。
動的型情報生成において、未使用クラスの登録は行わないようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler32/Compile_ProcOp.cpp

    r90 r91  
    220220}
    221221
    222 void CompileBufferInProcedure(UserProc *pUserProc){
     222void _compile_proc(UserProc *pUserProc){
    223223    extern char *basbuf;
    224224    extern HANDLE hHeap;
     
    842842    //ローカル変数のネーム情報は後に解放する
    843843}
     844
     845void CompileBufferInProcedure( UserProc &userProc ){
     846    if( userProc.IsUsing() == false || userProc.IsCompiled() ) return;
     847
     848    _compile_proc( &userProc );
     849
     850    // ログを履く
     851    char temporary[8192];
     852    temporary[0]=0;
     853    lstrcat( temporary, "------------------------------------------------------------------\n" );
     854    sprintf( temporary + lstrlen(temporary), "【 %s のコード情報】\n", userProc.GetFullName().c_str() );
     855    sprintf( temporary + lstrlen(temporary), "code size: %d bytes\n", userProc.GetCodeSize() );
     856    lstrcat( temporary, "------------------------------------------------------------------\n" );
     857    lstrcat( temporary, "\n" );
     858    Smoothie::Logger::Put( temporary );
     859}
    844860void CompileLocal(){
    845861    extern UserProc **ppSubHash;
     
    852868        pUserProc=GetSubHash("_System_InitDllGlobalVariables");
    853869        if(pUserProc){
    854             CompileBufferInProcedure(pUserProc);
     870            CompileBufferInProcedure( *pUserProc );
    855871        }
    856872        else SetError(300,NULL,cp);
     
    870886        pUserProc=ppSubHash[i2];
    871887        while(pUserProc){
    872             CompileBufferInProcedure(pUserProc);
     888            CompileBufferInProcedure( *pUserProc );
    873889            pUserProc=pUserProc->pNextData;
    874890        }
     
    889905    //_System_InitStaticLocalVariablesは一番最後にコンパイル
    890906    pSub_System_InitStaticLocalVariables->KillCompileStatus();
    891     CompileBufferInProcedure(pSub_System_InitStaticLocalVariables);
     907    CompileBufferInProcedure( *pSub_System_InitStaticLocalVariables );
    892908
    893909    //_System_Call_Destructor_of_GlobalObjectは一番最後にコンパイル
    894910    pSub_System_Call_Destructor_of_GlobalObject->KillCompileStatus();
    895     CompileBufferInProcedure(pSub_System_Call_Destructor_of_GlobalObject);
     911    CompileBufferInProcedure( *pSub_System_Call_Destructor_of_GlobalObject );
    896912}
Note: See TracChangeset for help on using the changeset viewer.