Changeset 459 in dev for trunk/ab5.0/abdev/BasicCompiler32


Ignore:
Timestamp:
Mar 23, 2008, 10:38:38 AM (16 years ago)
Author:
dai_9181
Message:

・Compiler::IsDebugメソッドを導入した(bDebugCompileグローバル変数は廃止)。
・bStrictグローバル変数は意味を成さないので廃止した。

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

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler32/Compile_CallProc.cpp

    r435 r459  
    2424}
    2525
    26 bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer){
    27 
    28     extern BOOL bDebugCompile;
     26bool Opcode_CallProcPtr( const char *variable, const char *lpszParms,ProcPointer *pProcPointer)
     27{
    2928    extern BOOL bDebugSupportProc;
    30     if(bDebugCompile&&bDebugSupportProc==0)
     29    if( compiler.IsDebug() && bDebugSupportProc == 0 )
     30    {
    3131        Call_DebugSys_SaveContext();
     32    }
    3233
    3334
     
    433434}
    434435
    435 bool Opcode_CallDllProc( const char *lpszParms, const DllProc *pDllProc ){
    436 
    437     extern BOOL bDebugCompile;
     436bool Opcode_CallDllProc( const char *lpszParms, const DllProc *pDllProc )
     437{
    438438    extern BOOL bDebugSupportProc;
    439     if(bDebugCompile&&bDebugSupportProc==0&& pDllProc->IsEqualSymbol( "DebugBreak" ) ){
     439    if( compiler.IsDebug() && bDebugSupportProc==0 && pDllProc->IsEqualSymbol( "DebugBreak" ) )
     440    {
    440441        Call_DebugSys_SaveContext();
    441442    }
     
    487488void Opcode_CallDelegate( const Delegate &dg, const char *methodPtrValueStr, const char *objPtrValueStr, const char *params )
    488489{
    489     extern BOOL bDebugCompile;
    490490    extern BOOL bDebugSupportProc;
    491     if(bDebugCompile&&bDebugSupportProc==0)
     491    if( compiler.IsDebug() && bDebugSupportProc == 0 )
     492    {
    492493        Call_DebugSys_SaveContext();
     494    }
    493495
    494496
  • trunk/ab5.0/abdev/BasicCompiler32/Compile_ProcOp.cpp

    r402 r459  
    4242        cp=-1;
    4343
    44         extern BOOL bDebugCompile;
    45         if(bDebugCompile){
     44        if( compiler.IsDebug() )
     45        {
    4646            //デバッグ用の変数を定義
    4747            DebugVariable();
     
    283283    extern char *basbuf;
    284284    extern HANDLE hHeap;
    285     extern BOOL bDebugCompile;
    286285    int i3,i4,BaseOffset;
    287286    char temporary[VN_SIZE];
     
    301300
    302301    extern BOOL bDebugSupportProc;
    303     if(memcmp(pUserProc->GetName().c_str(),"_DebugSys_",10)==0){
    304         if(!bDebugCompile){
     302    if(memcmp(pUserProc->GetName().c_str(),"_DebugSys_",10)==0)
     303    {
     304        if( !compiler.IsDebug() )
     305        {
    305306            return;
    306307        }
     
    476477
    477478    const PertialSchedule *pEspOffsetPertialSchedule = NULL;
    478     if(bDebugCompile&&bDebugSupportProc==0){
     479    if( compiler.IsDebug() && bDebugSupportProc == 0 )
     480    {
    479481        //push dword ptr[ebp+(AllLocalVarSize-BaseOffset)](スケジュール)
    480482        pEspOffsetPertialSchedule = compiler.codeGenerator.op_push_M( REG_EBP, 0, Schedule::None, true );
     
    633635    compiler.codeGenerator.ResolveExitSubSchedule();
    634636
    635     if(bDebugCompile&&bDebugSupportProc==0){
     637    if( compiler.IsDebug() && bDebugSupportProc == 0 )
     638    {
    636639        compiler.codeGenerator.opfix( pEspOffsetPertialSchedule, AllLocalVarSize-BaseOffset-sizeof(long) );
    637640
     
    739742    compiler.codeGenerator.op_pop(REG_EBX);
    740743
    741     if(bDebugCompile){
     744    if( compiler.IsDebug() )
     745    {
    742746        //cmp esp,ebp
    743747        compiler.codeGenerator.op_cmp_RR( REG_ESP, REG_EBP );
  • trunk/ab5.0/abdev/BasicCompiler32/MakePeHdr.cpp

    r451 r459  
    102102    extern HWND hOwnerEditor;
    103103    extern HANDLE hHeap;
    104     extern BOOL bDebugCompile;
    105104    extern DWORD ImageBase;
    106105    extern char *basbuf;
     
    130129    //////////////////
    131130    // データテーブル
    132     if(bDebugCompile){
     131    if( compiler.IsDebug() ){
    133132        compiler.GetObjectModule().dataTable.Add( (long)0x00000002 );
    134133    }
     
    401400            compiler.codeGenerator.op_push(REG_EBP);
    402401
    403             if(bDebugCompile)
     402            if( compiler.IsDebug() )
    404403            {
    405404                // デバッグ用の変数を定義
     
    832831    CDebugSection *pobj_DebugSection;
    833832    pobj_DebugSection=new CDebugSection();
    834     extern BOOL bDebugCompile;
    835833    extern BOOL bError;
    836     if(bDebugCompile&&bError==0){
     834    if( compiler.IsDebug() && bError == 0 )
     835    {
    837836        CompileMessage( "デバッグ情報を生成しています。" );
    838837
Note: See TracChangeset for help on using the changeset viewer.