Ignore:
Timestamp:
May 10, 2008, 12:19:15 PM (16 years ago)
Author:
dai_9181
Message:

[530][583]を64bit版にマージ。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/compiler_x64/MakePeHdr.cpp

    r528 r584  
    119119
    120120
     121    //"メタ情報を解析中..."
     122    compiler.messenger.Output( STRING_ANALYZING_META_INFO );
     123
     124
    121125    //////////////////////
    122126    // コード生成前の準備
    123127    //////////////////////
    124128
    125     //重複エラー情報管理のメモリを確保(グローバル領域コンパイル用)
    126     extern char **SynonymErrorWords;
    127     extern int SynonymErrorNum;
    128     SynonymErrorNum=0;
    129     SynonymErrorWords=(char **)HeapAlloc(hHeap,0,1);
     129    // 重複エラー情報をクリア
     130    compiler.errorMessenger.ClearSynonymKeyWords();
    130131
    131132    //列挙体に関する情報を収集
    132     compiler.enumInfoCollection.InitEnum();
    133 
    134     //列挙体からクラスコードを生成
    135     char *temp;
    136     temp = compiler.enumInfoCollection.GenerateSourceCode();
    137     AddSourceCode(temp);
    138     HeapDefaultFree(temp);
     133    {
     134        ActiveBasic::Compiler::LexicalAnalyzer::CollectEnums(
     135            compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     136            compiler.enumInfoCollection
     137        );
     138
     139        // デリゲートからクラスコードを生成
     140        std::string tempSource = ActiveBasic::Compiler::LexicalAnalyzer::GenerateEnumsSourceCode(
     141            compiler.enumInfoCollection
     142        );
     143        AddSourceCode( tempSource.c_str() );
     144    }
    139145
    140146    // 名前空間情報を取得
     
    147153    {
    148154        ActiveBasic::Compiler::LexicalAnalyzer::CollectDelegates(
    149             compiler.GetObjectModule().GetCurrentSource(),
     155            compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
    150156            compiler.GetObjectModule().meta.GetDelegates()
    151157        );
     
    167173    );
    168174
    169     //TypeDef情報を初期化
    170     compiler.GetObjectModule().meta.GetTypeDefs().CollectTypeDefs();
     175    //TypeDef情報を収集
     176    ActiveBasic::Compiler::LexicalAnalyzer::CollectTypeDefs(
     177        compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     178        compiler.GetObjectModule().meta.GetTypeDefs()
     179    );
    171180
    172181    /*
     
    180189
    181190    //定数情報を取得
    182     GetConstInfo();
     191    ActiveBasic::Compiler::LexicalAnalyzer::CollectConsts(
     192        compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     193        compiler.GetObjectModule().meta.GetGlobalConsts(),
     194        compiler.GetObjectModule().meta.GetGlobalConstMacros()
     195    );
    183196
    184197    //サブルーチン(ユーザー定義、DLL関数)の識別子、アドレスを取得
    185     compiler.pCompilingClass = NULL;
     198    compiler.SetCompilingClass( NULL );
    186199    ActiveBasic::Compiler::LexicalAnalyzer::CollectProcedures(
    187         compiler.GetObjectModule().GetCurrentSource(),
     200        compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
    188201        compiler.GetObjectModule().meta.GetUserProcs(),
    189202        compiler.GetObjectModule().meta.GetDllProcs()
     
    320333
    321334
     335    //"コンパイル中..."
     336    compiler.messenger.Output(STRING_COMPILE_COMPILING);
     337
     338
    322339    //////////////////////
    323340    // グローバル実行領域
     
    325342
    326343    cp=-1;
    327     UserProc::CompileStartForGlobalArea();
     344    compiler.StartGlobalAreaCompile();
    328345
    329346    if( !compiler.IsDll() ){
     
    434451    }
    435452
    436     //重複エラー情報管理のメモリを解放(グローバル領域用)
    437     for(i=0;i<SynonymErrorNum;i++) HeapDefaultFree(SynonymErrorWords[i]);
    438     HeapDefaultFree(SynonymErrorWords);
    439 
    440453
    441454    StepCompileProgress();
     
    499512    /////////////////////////////////////////////////////////////////
    500513
    501     compiler.GetObjectModule().meta.GetClasses().GenerateVTables();
     514    ActiveBasic::Compiler::VtblGenerator::GenerateVTablesForAllClasses(
     515        compiler.GetObjectModule().meta.GetClasses()
     516    );
    502517
    503518
     
    10771092    ////////////////////////////////////////
    10781093    //仮想関数データテーブルスケジュール
    1079     compiler.GetObjectModule().meta.GetClasses().ActionVtblSchedule( ImageBase, MemPos_CodeSection, MemPos_DataSection );
     1094    ActiveBasic::Compiler::VtblGenerator::ActionVtblScheduleForAllClasses(
     1095        compiler.GetObjectModule().meta.GetClasses(),
     1096        ImageBase,
     1097        MemPos_CodeSection,
     1098        MemPos_DataSection
     1099    );
    10801100
    10811101
Note: See TracChangeset for help on using the changeset viewer.