Changeset 94 in dev for BasicCompiler64/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
  • BasicCompiler64/Compile_ProcOp.cpp

    r91 r94  
    845845    }
    846846
     847    //_System_TypeBase_InitializeUserTypesは一番最後にコンパイル
     848    extern UserProc *pSubStaticMethod_System_TypeBase_InitializeUserTypes;
     849    pSubStaticMethod_System_TypeBase_InitializeUserTypes->CompleteCompile();
     850
    847851    //_System_InitStaticLocalVariablesは一番最後にコンパイル
    848852    //※一般関数内の静的変数オブジェクトをすべて収集しなければならない
     
    854858    pSub_System_Call_Destructor_of_GlobalObject->CompleteCompile();
    855859
    856 Repeat:
     860repeat:
    857861    for(i2=0;i2<MAX_HASH;i2++){
    858862        pUserProc=ppSubHash[i2];
     
    863867    }
    864868
    865     //プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
    866     for(i2=0;i2<MAX_HASH;i2++){
    867         pUserProc=ppSubHash[i2];
    868         while(pUserProc){
    869             if( pUserProc->IsUsing() && pUserProc->IsCompiled() == false ){
    870                 goto Repeat;
    871             }
    872 
    873             pUserProc=pUserProc->pNextData;
     869    if( IsNeedProcCompile() ){
     870        //プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
     871        goto repeat;
     872    }
     873
     874    //_System_TypeBase_InitializeUserTypesは最後のほうでコンパイル
     875    pSubStaticMethod_System_TypeBase_InitializeUserTypes->KillCompileStatus();
     876    CompileBufferInProcedure( *pSubStaticMethod_System_TypeBase_InitializeUserTypes );
     877
     878    if( IsNeedProcCompile() ){
     879        //プロシージャコンパイルによって、プロシージャコンパイルが必要になる場合
     880        for(i2=0;i2<MAX_HASH;i2++){
     881            pUserProc=ppSubHash[i2];
     882            while(pUserProc){
     883                CompileBufferInProcedure( *pUserProc );
     884                pUserProc=pUserProc->pNextData;
     885            }
    874886        }
    875887    }
Note: See TracChangeset for help on using the changeset viewer.