Changeset 537 in dev for trunk/ab5.0/abdev/compiler_x86


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

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

Location:
trunk/ab5.0/abdev/compiler_x86
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/compiler_x86/Compile_Func.cpp

    r536 r537  
    614614    }
    615615
    616     resultType = UserProc::CompilingUserProc().ReturnType();
     616    resultType = compiler.GetCompilingUserProc().ReturnType();
    617617}
    618618void Opcode_Func_System_Get_Bp()
  • trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp

    r536 r537  
    3232
    3333        const UserProc *pBackUserProc;
    34         pBackUserProc = &UserProc::CompilingUserProc();
    35         UserProc::CompileStartForGlobalArea();
     34        pBackUserProc = &compiler.GetCompilingUserProc();
     35        compiler.StartGlobalAreaCompile();
    3636
    3737        int BackCp;
     
    5757        GetGlobalDataForDll();
    5858
    59         UserProc::CompileStartForUserProc( pBackUserProc );
     59        compiler.SetCompilingUserProc( pBackUserProc );
    6060        cp=BackCp;
    6161
     
    8989
    9090        const UserProc *pBackUserProc;
    91         pBackUserProc = &UserProc::CompilingUserProc();
    92         UserProc::CompileStartForGlobalArea();
     91        pBackUserProc = &compiler.GetCompilingUserProc();
     92        compiler.StartGlobalAreaCompile();
    9393
    9494        compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
    9595
    96         UserProc::CompileStartForUserProc( pBackUserProc );
     96        compiler.SetCompilingUserProc( pBackUserProc );
    9797
    9898
     
    225225        UserProc::pGlobalProc = &userProc;
    226226
    227         const UserProc *pBackUserProc = &UserProc::CompilingUserProc();
    228         UserProc::CompileStartForGlobalArea();
     227        const UserProc *pBackUserProc = &compiler.GetCompilingUserProc();
     228        compiler.StartGlobalAreaCompile();
    229229
    230230        int BackCp = cp;
     
    250250        }
    251251
    252         UserProc::CompileStartForUserProc( pBackUserProc );
     252        compiler.SetCompilingUserProc( pBackUserProc );
    253253        cp=BackCp;
    254254    }
  • trunk/ab5.0/abdev/compiler_x86/Compile_Statement.cpp

    r465 r537  
    893893
    894894void OpcodeExitSub(void){
    895     if( UserProc::IsGlobalAreaCompiling() ){
     895    if( compiler.IsGlobalAreaCompiling() ){
    896896        compiler.errorMessenger.Output(12,"Exit Sub/Function",cp);
    897897        return;
     
    12311231}
    12321232void OpcodeReturn(char *Parameter){
    1233     if( UserProc::IsGlobalAreaCompiling() ){
     1233    if( compiler.IsGlobalAreaCompiling() ){
    12341234        //Gosub~Returnとして扱う
    12351235
     
    12401240        //戻り値をセット
    12411241        if(Parameter[0]){
    1242             const UserProc &proc = UserProc::CompilingUserProc();
     1242            const UserProc &proc = compiler.GetCompilingUserProc();
    12431243
    12441244            const char *temp = "_System_ReturnValue";
  • trunk/ab5.0/abdev/compiler_x86/Compile_Var.cpp

    r536 r537  
    388388
    389389
    390     if( UserProc::IsLocalAreaCompiling() ){
     390    if( compiler.IsLocalAreaCompiling() ){
    391391        //////////////////
    392392        // ローカル変数
    393393        //////////////////
    394394
    395         const Variable *pVar = UserProc::CompilingUserProc().GetLocalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
     395        const Variable *pVar = compiler.GetCompilingUserProc().GetLocalVars().BackSearch( LexicalAnalyzer::FullNameToSymbol( VarName ) );
    396396        if( pVar ){
    397397            //ポインタ変数の場合
     
    517517
    518518        char temporary[VN_SIZE];
    519         if( UserProc::IsLocalAreaCompiling() ){
     519        if( compiler.IsLocalAreaCompiling() ){
    520520            GetNowStaticVarFullName(VarName,temporary);
    521521
     
    10921092
    10931093void dim( char *VarName, const Subscripts &subscripts, const Type &type,const char *InitBuf,const char *ConstractParameter,DWORD dwFlags){
    1094     if( UserProc::IsGlobalAreaCompiling() ){
     1094    if( compiler.IsGlobalAreaCompiling() ){
    10951095        /////////////////////////
    10961096        // グローバル変数
     
    11041104        /////////////////
    11051105
    1106         if( UserProc::CompilingUserProc().GetLocalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( VarName ) ) ){
     1106        if( compiler.GetCompilingUserProc().GetLocalVars().DuplicateCheck( LexicalAnalyzer::FullNameToSymbol( VarName ) ) ){
    11071107            //2重定義のエラー
    11081108            compiler.errorMessenger.Output(15,VarName,cp);
     
    11281128
    11291129        // 変数を追加
    1130         UserProc::CompilingUserProc().GetLocalVars().push_back( pVar );
     1130        compiler.GetCompilingUserProc().GetLocalVars().push_back( pVar );
    11311131
    11321132        //アラインメントを考慮
     
    11451145                // 呼び出し側のオフセットズレを考慮する
    11461146
    1147                 if( 0 == ( UserProc::CompilingUserProc().RealParams().GetMemorySize() + PTR_SIZE /* ret分 */ ) % alignment ){
     1147                if( 0 == ( compiler.GetCompilingUserProc().RealParams().GetMemorySize() + PTR_SIZE /* ret分 */ ) % alignment ){
    11481148                    AllLocalVarSize += PTR_SIZE;
    11491149                }
  • trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp

    r536 r537  
    365365
    366366    cp=-1;
    367     UserProc::CompileStartForGlobalArea();
     367    compiler.StartGlobalAreaCompile();
    368368
    369369    if( !compiler.IsDll() ){
Note: See TracChangeset for help on using the changeset viewer.