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/BasicCompiler_Common
Files:
8 edited

Legend:

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

    r457 r459  
    620620        {
    621621            // デバッグ ビルド
    622             bDebugCompile = 1;
     622            compiler.SetDebugMark( true );
    623623        }
    624624        else if( cmdLine.GetCommand() == "run" )
     
    726726        if( compiler.IsStaticLibrary() )
    727727        {
    728             if(bDebugCompile||bDebugRun)
     728            if( bDebugRun || compiler.IsDebug() )
    729729            {
    730730                lstrcat(OutputFileName,"_debug.abobj");
     
    737737        else
    738738        {
    739             if(bDebugCompile||bDebugRun)
     739            if( bDebugRun || compiler.IsDebug() )
    740740            {
    741741                lstrcat(OutputFileName,"_debug.exe");
  • trunk/ab5.0/abdev/BasicCompiler_Common/BasicCompiler.h

    r334 r459  
    2020
    2121//プログラム情報
    22 BOOL bStrict;
    2322DWORD ImageBase;
    2423
     
    4443
    4544//デバッグ
    46 BOOL bDebugCompile=0;
    4745BOOL bDebugRun=0;
    4846BOOL bAttach=0;
  • trunk/ab5.0/abdev/BasicCompiler_Common/Compile.cpp

    r438 r459  
    442442
    443443        case COM_DEBUG:
    444             extern BOOL bDebugCompile;
    445444            //int 3
    446             if(bDebugCompile)
     445            if( compiler.IsDebug() )
    447446            {
    448447                breakpoint;
  • trunk/ab5.0/abdev/BasicCompiler_Common/Intermediate_Step1.cpp

    r402 r459  
    244244    int i,i2,i3;
    245245    char temporary[VN_SIZE];
    246 
    247     extern BOOL bStrict;
    248     bStrict=1;
    249246
    250247    for(i=0;;i++){
  • trunk/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp

    r350 r459  
    157157
    158158            const char *coreFileName = "core.lib";
    159             if( bDebugCompile )
     159            if( compiler.IsDebug() )
    160160            {
    161161                coreFileName = "cored.lib";
     
    282282}
    283283int MainThread(DWORD dummy){
    284     extern BOOL bDebugCompile;
    285284    extern BOOL bDebugRun;
    286285    extern int bError;
    287286
    288287    if(bDebugRun){
    289         if(bDebugCompile){
     288        if( compiler.IsDebug() )
     289        {
    290290            bDebugRun=0;
    291291
  • trunk/ab5.0/abdev/BasicCompiler_Common/error.cpp

    r457 r459  
    496496    }
    497497
    498     //#strictが指定されていないときは型チェックを行わないようにする
    499     extern BOOL bStrict;
    500     if(bStrict==0) return true;
    501 
    502498    if( calcType.GetBasicType() & FLAG_PTR )
    503499    {
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Compiler.h

    r407 r459  
    1414class Compiler
    1515{
     16public:
     17    // ターゲット
     18    enum TargetModuleType
     19    {
     20        Exe,
     21        Dll,
     22        StaticLibrary,
     23    };
     24
     25private:
    1626    // モジュール名
    1727    std::string moduleName;
     28
     29    // モジュール タイプ
     30    TargetModuleType targetModuleType;
     31
     32    // デバッグ ビルドかどうか
     33    bool isDebug;
    1834
    1935    // 名前空間サポート
     
    3046        , pNowObjectModule( pObjectModule )
    3147        , targetModuleType( Exe )
     48        , isDebug( false )
    3249        , isCore( false )
    3350    {
     
    87104    }
    88105
    89 
    90     // ターゲット
    91     enum TargetModuleType
    92     {
    93         Exe,
    94         Dll,
    95         StaticLibrary,
    96     };
    97 
    98     TargetModuleType targetModuleType;
    99 
    100106    bool IsExe() const
    101107    {
     
    127133    }
    128134
     135    void SetDebugMark( bool isDebug )
     136    {
     137        this->isDebug = isDebug;
     138    }
     139    bool IsDebug() const
     140    {
     141        return isDebug;
     142    }
     143
    129144
    130145    // コアモジュールかどうか
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp

    r402 r459  
    105105//////////////////////////////////////
    106106
    107 CDefine::CDefine( int majorVer ){
     107CDefine::CDefine( int majorVer )
     108{
    108109    Init( majorVer );
    109110}
    110 CDefine::~CDefine(){
    111 }
    112 void CDefine::Init( int majorVer ){
     111CDefine::~CDefine()
     112{
     113}
     114void CDefine::Init( int majorVer )
     115{
    113116    names.clear();
    114117
    115     extern BOOL bDebugCompile;
    116     if(bDebugCompile) add("_DEBUG");
     118    if( compiler.IsDebug() )
     119    {
     120        add("_DEBUG");
     121    }
    117122
    118123#ifdef _AMD64_
     
    120125#endif
    121126
    122     if( compiler.IsDll() ){
     127    if( compiler.IsDll() )
     128    {
    123129        add("_DLL");
    124130    }
    125131
    126     if( Smoothie::IsUnicode() ){
     132    if( Smoothie::IsUnicode() )
     133    {
    127134        add( "UNICODE" );
    128135    }
Note: See TracChangeset for help on using the changeset viewer.