Changeset 94 in dev for BasicCompiler32/Compile_ProcOp.cpp


Ignore:
Timestamp:
Apr 14, 2007, 8:36:04 PM (17 years ago)
Author:
dai_9181
Message:

New[]を禁止した。
一部の動的型情報が生成されないバグを修正。
As演算子によるダウンキャストを許可(プログラム的なチェックはまだ走っていない)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler32/Compile_ProcOp.cpp

    r92 r94  
    873873    }
    874874
     875    //_System_TypeBase_InitializeUserTypesは一番最後にコンパイル
     876    extern UserProc *pSubStaticMethod_System_TypeBase_InitializeUserTypes;
     877    pSubStaticMethod_System_TypeBase_InitializeUserTypes->CompleteCompile();
     878
    875879    //_System_InitStaticLocalVariablesは一番最後にコンパイル
    876880    //※一般関数内の静的変数オブジェクトをすべて収集しなければならない
     
    882886    pSub_System_Call_Destructor_of_GlobalObject->CompleteCompile();
    883887
    884 Repeat:
     888repeat:
    885889    for(i2=0;i2<MAX_HASH;i2++){
    886890        pUserProc=ppSubHash[i2];
     
    891895    }
    892896
    893     //プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
    894     for(i2=0;i2<MAX_HASH;i2++){
    895         pUserProc=ppSubHash[i2];
    896         while(pUserProc){
    897             if( pUserProc->IsUsing() && pUserProc->IsCompiled() == false ){
    898                 goto Repeat;
    899             }
    900 
    901             pUserProc=pUserProc->pNextData;
     897    if( IsNeedProcCompile() ){
     898        //プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
     899        goto repeat;
     900    }
     901
     902    //_System_TypeBase_InitializeUserTypesは最後のほうでコンパイル
     903    pSubStaticMethod_System_TypeBase_InitializeUserTypes->KillCompileStatus();
     904    CompileBufferInProcedure( *pSubStaticMethod_System_TypeBase_InitializeUserTypes );
     905
     906    if( IsNeedProcCompile() ){
     907        //プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
     908        for(i2=0;i2<MAX_HASH;i2++){
     909            pUserProc=ppSubHash[i2];
     910            while(pUserProc){
     911                CompileBufferInProcedure( *pUserProc );
     912                pUserProc=pUserProc->pNextData;
     913            }
    902914        }
    903915    }
Note: See TracChangeset for help on using the changeset viewer.