Ignore:
Timestamp:
May 3, 2008, 6:58:38 PM (16 years ago)
Author:
dai_9181
Message:

UserProcクラスによるコンパイル中関数管理用メソッドを除去(すべてCompilerクラス内で処理するようにした)。

Location:
trunk/ab5.0/abdev/BasicCompiler_Common/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Compiler.cpp

    r536 r537  
    222222}
    223223
     224void Compiler::SetCompilingUserProc( const UserProc *pUserProc )
     225{
     226    this->pCompilingUserProc = pUserProc;
     227
     228    this->SetCompilingClass( pUserProc->GetParentClassPtr() );
     229}
     230
     231void Compiler::StartGlobalAreaCompile()
     232{
     233    ClearCompilingUserProcAndClass();
     234}
     235
    224236void Compiler::StartProcedureCompile( const UserProc *pUserProc )
    225237{
    226238    //コンパイル中の関数
    227     this->pCompilingUserProc = pUserProc;
    228 
    229     //コンパイル中の関数が属するクラス
    230     this->SetCompilingClass( pUserProc->GetParentClassPtr() );
     239    this->SetCompilingUserProc( pUserProc );
    231240
    232241    //コンパイルスタートをクラス管理クラスに追加
    233242    this->GetObjectModule().meta.GetClasses().StartCompile( pUserProc );
    234243
    235     //コンパイル中の関数
    236     UserProc::CompileStartForUserProc( pUserProc );
    237 
    238244    // コンパイル中の関数が属する名前空間
    239245    this->GetNamespaceSupporter().SetLivingNamespaceScopes( pUserProc->GetNamespaceScopes() );
     
    255261    return ( pCompilingUserProc == NULL );
    256262}
     263bool Compiler::IsLocalAreaCompiling()
     264{
     265    return ( pCompilingUserProc != NULL );
     266}
    257267const UserProc &Compiler::GetCompilingUserProc()
    258268{
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Exception.cpp

    r524 r537  
    222222
    223223            // Catchアドレス
    224             const UserProc *pUserProc = &UserProc::CompilingUserProc();
    225             if( UserProc::IsGlobalAreaCompiling() )
     224            const UserProc *pUserProc = &compiler.GetCompilingUserProc();
     225            if( compiler.IsGlobalAreaCompiling() )
    226226            {
    227227                pUserProc = UserProc::pGlobalProc;
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalScope.cpp

    r485 r537  
    7171    CallDestructorsOfScopeEnd();
    7272
    73     Variables *pVars = UserProc::IsGlobalAreaCompiling() ?
     73    Variables *pVars = compiler.IsGlobalAreaCompiling() ?
    7474        &compiler.GetObjectModule().meta.GetGlobalVars() :
    75         &UserProc::CompilingUserProc().GetLocalVars();
     75        &compiler.GetCompilingUserProc().GetLocalVars();
    7676
    7777    //使用済みローカル変数の生存チェックを外す
     
    9898void LexicalScopes::CallDestructorsOfScopeEnd(){
    9999
    100     Variables *pVariabls = UserProc::IsGlobalAreaCompiling() ?
     100    Variables *pVariabls = compiler.IsGlobalAreaCompiling() ?
    101101        &compiler.GetObjectModule().meta.GetGlobalVars() :
    102         &UserProc::CompilingUserProc().GetLocalVars();
     102        &compiler.GetCompilingUserProc().GetLocalVars();
    103103
    104104
     
    109109        Variable *pVar = (*pVariabls)[i3];
    110110
    111         if( UserProc::IsGlobalAreaCompiling() && GetNowLevel() == 0 ){
     111        if( compiler.IsGlobalAreaCompiling() && GetNowLevel() == 0 ){
    112112            if( pVar->GetName() == "_System_GC" ){
    113113                indexSystemGC=i3;
     
    152152
    153153
    154             if( UserProc::IsGlobalAreaCompiling() ){
     154            if( compiler.IsGlobalAreaCompiling() ){
    155155                //ここには来ないハズ
    156156                compiler.errorMessenger.Output(300,NULL,cp);
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/NativeCode.cpp

    r465 r537  
    8585    if( scheduleType == Schedule::CatchAddress )
    8686    {
    87         const UserProc *pUserProc = &UserProc::CompilingUserProc();
    88         if( UserProc::IsGlobalAreaCompiling() )
     87        const UserProc *pUserProc = &compiler.GetCompilingUserProc();
     88        if( compiler.IsGlobalAreaCompiling() )
    8989        {
    9090            pUserProc = UserProc::pGlobalProc;
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Procedure.cpp

    r523 r537  
    483483}
    484484
    485 const UserProc *UserProc::pCompilingUserProc = NULL;
    486485const UserProc *UserProc::pGlobalProc = NULL;
    487486
Note: See TracChangeset for help on using the changeset viewer.