Changeset 643 in dev for trunk/ab5.0/abdev


Ignore:
Timestamp:
Jun 16, 2008, 12:12:06 AM (16 years ago)
Author:
dai_9181
Message:

[636][637][640][641][642]を64bit版にマージ。

Location:
trunk/ab5.0/abdev/compiler_x64
Files:
3 edited

Legend:

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

    r633 r643  
    2222        }
    2323
    24         const UserProc *pBackUserProc;
    25         pBackUserProc = &compiler.GetCompilingUserProc();
    26         compiler.StartGlobalAreaCompile();
    27 
    2824        int BackCp;
    2925        BackCp=cp;
     
    5955        compiler.codeGenerator.opfix( pStackFramePertialSchedule, pobj_sf->GetFrameSize(0) );
    6056
    61         compiler.SetCompilingUserProc( pBackUserProc );
    6257        cp=BackCp;
    6358
     
    9792        compiler.codeGenerator.op_ret();
    9893    }
    99     else if( userProc.GetName() == "_System_Call_Destructor_of_GlobalObject" ){
     94    else if( userProc.GetName() == "_System_Call_Destructor_of_GlobalObject" )
     95    {
    10096        //sub rsp,8(※RSPを16バイト境界にあわせるため)
    10197        compiler.codeGenerator.op_sub_rsp(0x8);
    102 
    103         const UserProc *pBackUserProc;
    104         pBackUserProc = &compiler.GetCompilingUserProc();
    105         compiler.StartGlobalAreaCompile();
    106 
    10798        compiler.codeGenerator.lexicalScopes.CallDestructorsOfScopeEnd();
    108 
    109         compiler.SetCompilingUserProc( pBackUserProc );
    110 
    11199
    112100        //add rsp,8
     
    143131        Compile_AddGlobalRootsForGc();
    144132    }
    145     else if( userProc.GetName() == compiler.globalAreaProcName ){
     133    else if( userProc.GetName() == compiler.globalAreaProcName )
     134    {
    146135        ////////////////////////////////////////
    147136        // グローバル領域をコンパイル
     
    149138
    150139        UserProc::pGlobalProc = &userProc;
    151 
    152         const UserProc *pBackUserProc = &compiler.GetCompilingUserProc();
    153         compiler.StartGlobalAreaCompile();
    154140
    155141        int BackCp = cp;
     
    177163        }
    178164
    179         compiler.SetCompilingUserProc( pBackUserProc );
    180165        cp=BackCp;
    181166    }
     
    217202    pUserProc->CompleteCompile();
    218203
    219     extern BOOL bSystemProc;
    220     if(memcmp(pUserProc->GetName().c_str(),"_System_",8)==0) bSystemProc=1;
    221     else bSystemProc=0;
    222 
    223204    extern BOOL bDebugSupportProc;
    224205    if(memcmp(pUserProc->GetName().c_str(),"_DebugSys_",10)==0){
     
    233214    compiler.StartProcedureCompile( pUserProc );
    234215
    235     if(pUserProc->IsSystem()){
     216    if(pUserProc->IsAutoGenerationSystem()){
    236217        ////////////////////
    237218        // 特殊関数
     
    256237    if( !pUserProc->IsAutoGeneration() )
    257238    {
     239        // 対象のソースコードを含むオブジェクトモジュールのインデックスを指定する
     240        // ※テンプレート展開がされている場合、対象のソースコードが現在のオブジェクトモジュールではない場合がある
     241        compiler.SetCurrentRelationalObjectModuleIndexForSource( pUserProc->GetSourceCodePosition().GetRelationalObjectModuleIndex() );
     242        basbuf = const_cast<char *>(compiler.GetCurrentSource().GetBuffer());
     243
    258244        cp=pUserProc->GetSourceCodePosition().GetPos();
    259245        for(;;cp++){
  • trunk/ab5.0/abdev/compiler_x64/Compile_Var.cpp

    r633 r643  
    13411341}
    13421342
    1343 bool Compile_AddGlobalRootsForGc(){
     1343bool Compile_AddGlobalRootsForGc()
     1344{
    13441345    const UserProc *pUserProc_AddGlobalRootPtr = GetClassMethod( "_System_CGarbageCollection", "AddGlobalRootPtr" );
    1345     if( !pUserProc_AddGlobalRootPtr ){
     1346    if( !pUserProc_AddGlobalRootPtr )
     1347    {
    13461348        compiler.errorMessenger.Output(3, "_System_CGarbageCollection.AddGlobalRootPtr", -1 );
    13471349        return false;
  • trunk/ab5.0/abdev/compiler_x64/MakePeHdr.cpp

    r633 r643  
    109109
    110110    // 静的リンク
     111    compiler.PreStaticLink( compiler.staticLibraries );
    111112    compiler.StaticLink( compiler.staticLibraries );
     113
     114    // 依存関係の解決
     115    ActiveBasic::Common::Lexical::ResolveErrors resolveErrors;
     116    compiler.GetObjectModule().Resolve( resolveErrors );
     117    BOOST_FOREACH( const ResolveError &resolveError, resolveErrors )
     118    {
     119        compiler.errorMessenger.Output( ErrorInfo( 13, resolveError.GetTargetItemName(), -1 ) );
     120    }
    112121
    113122
     
    134143    {
    135144        ActiveBasic::Compiler::LexicalAnalyzer::CollectEnums(
    136             compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     145            compiler.GetCurrentSource().GetBuffer(),
    137146            compiler.enumInfoCollection
    138147        );
     
    147156    // 名前空間情報を取得
    148157    ActiveBasic::Compiler::LexicalAnalyzer::CollectNamespaces(
    149         compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     158        compiler.GetCurrentSource().GetBuffer(),
    150159        compiler.GetObjectModule().meta.GetNamespaces()
    151160    );
     
    154163    {
    155164        ActiveBasic::Compiler::LexicalAnalyzer::CollectDelegates(
    156             compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     165            compiler.GetCurrentSource().GetBuffer(),
    157166            compiler.GetObjectModule().meta.GetDelegates()
    158167        );
     
    170179    //     ※オブジェクトの内容までは取得しない
    171180    ActiveBasic::Compiler::LexicalAnalyzer::CollectClassesForNameOnly(
    172         compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     181        compiler.GetCurrentSource().GetBuffer(),
    173182        compiler.GetObjectModule().meta.GetClasses()
    174183    );
     
    176185    //TypeDef情報を収集
    177186    ActiveBasic::Compiler::LexicalAnalyzer::CollectTypeDefs(
    178         compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     187        compiler.GetCurrentSource().GetBuffer(),
    179188        compiler.GetObjectModule().meta.GetTypeDefs()
    180189    );
     
    191200    //定数情報を取得
    192201    ActiveBasic::Compiler::LexicalAnalyzer::CollectConsts(
    193         compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     202        compiler.GetCurrentSource().GetBuffer(),
    194203        compiler.GetObjectModule().meta.GetGlobalConsts(),
    195204        compiler.GetObjectModule().meta.GetGlobalConstMacros()
     
    199208    compiler.SetCompilingClass( NULL );
    200209    ActiveBasic::Compiler::LexicalAnalyzer::CollectProcedures(
    201         compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     210        compiler.GetCurrentSource().GetBuffer(),
    202211        compiler.GetObjectModule().meta.GetUserProcs(),
    203212        compiler.GetObjectModule().meta.GetDllProcs()
     
    206215    // クラス情報を取得(※注 - CollectProceduresの後に呼び出す)
    207216    ActiveBasic::Compiler::LexicalAnalyzer::CollectClasses(
    208         compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
     217        compiler.GetCurrentSource().GetBuffer(),
    209218        compiler.GetObjectModule().meta.GetClasses()
    210219    );
     
    245254    if(pSub_System_GetEip=GetSubHash("_System_GetEip",1)){
    246255        pSub_System_GetEip->Using();
    247         pSub_System_GetEip->ThisIsSystemProc();
     256        pSub_System_GetEip->ThisIsAutoGenerationSystemProc();
    248257    }
    249258
    250259    if(pSub_System_InitDllGlobalVariables=GetSubHash("_System_InitDllGlobalVariables",1)){
    251260        pSub_System_InitDllGlobalVariables->Using();
    252         pSub_System_InitDllGlobalVariables->ThisIsSystemProc();
     261        pSub_System_InitDllGlobalVariables->ThisIsAutoGenerationSystemProc();
    253262    }
    254263
    255264    if(pSub_System_InitStaticLocalVariables=GetSubHash("_System_InitStaticLocalVariables",1)){
    256265        pSub_System_InitStaticLocalVariables->Using();
    257         pSub_System_InitStaticLocalVariables->ThisIsSystemProc();
     266        pSub_System_InitStaticLocalVariables->ThisIsAutoGenerationSystemProc();
    258267    }
    259268
    260269    if(pSub_System_Call_Destructor_of_GlobalObject=GetSubHash("_System_Call_Destructor_of_GlobalObject",1)){
    261270        pSub_System_Call_Destructor_of_GlobalObject->Using();
    262         pSub_System_Call_Destructor_of_GlobalObject->ThisIsSystemProc();
     271        pSub_System_Call_Destructor_of_GlobalObject->ThisIsAutoGenerationSystemProc();
    263272    }
    264273
     
    483492    {
    484493        // 静的リンクライブラリ
     494
     495        // 外部参照をlibから取り除く
     496        ActiveBasic::Common::Environment::SetRemoveExternalMark( true );
    485497
    486498        // 格納先ディレクトリを作る
Note: See TracChangeset for help on using the changeset viewer.