Changeset 91 in dev for BasicCompiler64/Compile_ProcOp.cpp


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_ProcOp.cpp

    r90 r91  
    210210    }
    211211}
    212 void CompileBufferInProcedure(UserProc *pUserProc){
     212void _compile_proc(UserProc *pUserProc){
    213213    extern char *basbuf;
    214214    extern HANDLE hHeap;
     
    814814    HeapDefaultFree(SynonymErrorWords);
    815815}
     816
     817void CompileBufferInProcedure( UserProc &userProc ){
     818    if( userProc.IsUsing() == false || userProc.IsCompiled() ) return;
     819
     820    _compile_proc( &userProc );
     821
     822    // ログを履く
     823    char temporary[8192];
     824    temporary[0]=0;
     825    lstrcat( temporary, "------------------------------------------------------------------\n" );
     826    sprintf( temporary + lstrlen(temporary), "【 %s のコード情報】\n", userProc.GetFullName().c_str() );
     827    sprintf( temporary + lstrlen(temporary), "code size: %d bytes\n", userProc.GetCodeSize() );
     828    lstrcat( temporary, "------------------------------------------------------------------\n" );
     829    lstrcat( temporary, "\n" );
     830    Smoothie::Logger::Put( temporary );
     831}
    816832void CompileLocal(){
    817833    extern UserProc **ppSubHash;
     
    824840        pUserProc=GetSubHash("_System_InitDllGlobalVariables");
    825841        if(pUserProc){
    826             CompileBufferInProcedure(pUserProc);
     842            CompileBufferInProcedure( *pUserProc );
    827843        }
    828844        else SetError(300,NULL,cp);
     
    842858        pUserProc=ppSubHash[i2];
    843859        while(pUserProc){
    844             CompileBufferInProcedure(pUserProc);
     860            CompileBufferInProcedure( *pUserProc );
    845861            pUserProc=pUserProc->pNextData;
    846862        }
     
    861877    //_System_InitStaticLocalVariablesは一番最後にコンパイル
    862878    pSub_System_InitStaticLocalVariables->KillCompileStatus();
    863     CompileBufferInProcedure(pSub_System_InitStaticLocalVariables);
     879    CompileBufferInProcedure( *pSub_System_InitStaticLocalVariables );
    864880
    865881    //_System_Call_Destructor_of_GlobalObjectは一番最後にコンパイル
    866882    pSub_System_Call_Destructor_of_GlobalObject->KillCompileStatus();
    867     CompileBufferInProcedure(pSub_System_Call_Destructor_of_GlobalObject);
     883    CompileBufferInProcedure( *pSub_System_Call_Destructor_of_GlobalObject );
    868884}
Note: See TracChangeset for help on using the changeset viewer.