Changeset 468 in dev


Ignore:
Timestamp:
Mar 27, 2008, 3:04:28 AM (16 years ago)
Author:
dai_9181
Message:

64bit版を最新の状態にした

Location:
trunk/ab5.0/abdev
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler64/BasicCompiler.vcproj

    r463 r468  
    8282                Name="VCLinkerTool"
    8383                AdditionalOptions="/MACHINE:AMD64"
    84                 AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib commond.lib imagehlp.lib"
     84                AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib commond.lib imagehlp.lib shlwapi.lib"
    8585                OutputFile="../ActiveBasic/BasicCompiler64.exe"
    8686                LinkIncremental="2"
     
    195195                Name="VCLinkerTool"
    196196                AdditionalOptions="/MACHINE:AMD64"
    197                 AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib common.lib imagehlp.lib"
     197                AdditionalDependencies="comctl32.lib psapi.lib bufferoverflowu.lib common.lib imagehlp.lib shlwapi.lib"
    198198                OutputFile="../ActiveBasic/BasicCompiler64.exe"
    199199                LinkIncremental="1"
     
    329329                    >
    330330                </File>
     331                <File
     332                    RelativePath="..\BasicCompiler_Common\include\Messenger.h"
     333                    >
     334                </File>
    331335                <Filter
    332336                    Name="Language Classes"
     
    397401                    </File>
    398402                    <File
    399                         RelativePath="..\BasicCompiler_Common\include\Program.h"
    400                         >
    401                     </File>
    402                     <File
    403403                        RelativePath="..\BasicCompiler_Common\include\Prototype.h"
    404404                        >
     
    425425                    </File>
    426426                </Filter>
     427            </Filter>
     428            <Filter
     429                Name="Debugger Classes"
     430                >
     431                <File
     432                    RelativePath="..\BasicCompiler_Common\include\Debugger.h"
     433                    >
     434                </File>
     435            </Filter>
     436            <Filter
     437                Name="Application Classes"
     438                >
     439                <File
     440                    RelativePath="..\BasicCompiler_Common\include\Program.h"
     441                    >
     442                </File>
    427443            </Filter>
    428444        </Filter>
     
    12451261                    >
    12461262                </File>
     1263                <File
     1264                    RelativePath="..\BasicCompiler_Common\src\Messenger.cpp"
     1265                    >
     1266                </File>
    12471267                <Filter
    12481268                    Name="Language Classes"
     
    13301350                    <File
    13311351                        RelativePath="..\BasicCompiler_Common\src\Procedure.cpp"
    1332                         >
    1333                     </File>
    1334                     <File
    1335                         RelativePath="..\BasicCompiler_Common\src\Program.cpp"
    13361352                        >
    13371353                    </File>
     
    13621378                >
    13631379                <File
    1364                     RelativePath="..\BasicCompiler_Common\include\Program.h"
     1380                    RelativePath="..\BasicCompiler_Common\src\Program.cpp"
    13651381                    >
    13661382                </File>
  • trunk/ab5.0/abdev/BasicCompiler64/CParameter.cpp

    r436 r468  
    282282                char temp2[255];
    283283                sprintf(temp2,"%s関数の第%dパラメータ",procName,i2+1);
    284                 SetError(19,temp2,cp);
     284                compiler.errorMessenger.Output(19,temp2,cp);
    285285                continue;
    286286            }
     
    404404                                    if( dummyType.IsObject() ){
    405405                                        if( !dummyType.GetClass().IsEqualsOrSubClass( &varType.GetClass() ) ){
    406                                             SetError(11,Parms[i2],cp);
     406                                            compiler.errorMessenger.Output(11,Parms[i2],cp);
    407407                                        }
    408408                                    }
    409409                                    else if( dummyType.IsStruct() ){
    410410                                        if( !dummyType.GetClass().IsEquals( &varType.GetClass() ) ){
    411                                             SetError(11,Parms[i2],cp);
     411                                            compiler.errorMessenger.Output(11,Parms[i2],cp);
    412412                                        }
    413413                                    }
     
    418418                                }
    419419                                else{
    420                                     SetError(11,Parms[i2],cp);
     420                                    compiler.errorMessenger.Output(11,Parms[i2],cp);
    421421                                }
    422422                            }
  • trunk/ab5.0/abdev/BasicCompiler64/CodeGenerator.cpp

    r370 r468  
    414414    }
    415415
    416     if(RexByte==-1) SetError(300,NULL,cp);
     416    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    417417
    418418    // [8bit rex] 1000 1011 11xx xbbb
     
    435435    }
    436436
    437     if(RexByte==-1) SetError(300,NULL,cp);
     437    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    438438
    439439    //[8bit rex] 0110 0011 11rr rbbb
     
    455455    }
    456456
    457     if(RexByte==-1) SetError(300,NULL,cp);
     457    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    458458
    459459    //[8bit rex] 0000 1111 1011 1111 11rr rbbb
     
    476476    }
    477477
    478     if(RexByte==-1) SetError(300,NULL,cp);
     478    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    479479
    480480    //[8bit rex] 0000 1111 1011 1110 11rr rbbb
     
    504504    }
    505505
    506     if(RexByte==-1) SetError(300,NULL,cp);
     506    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    507507
    508508    //[8bit rex] 0000 1111 1011 1111 11rr rbbb
     
    526526    }
    527527
    528     if(RexByte==-1) SetError(300,NULL,cp);
     528    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    529529
    530530    //[8bit rex] 0000 1111 1011 1110 11rr rbbb
     
    555555    }
    556556
    557     if(RexByte==-1) SetError(300,NULL,cp);
     557    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    558558
    559559    //0110 0110 [8bit rex] 0000 1111 1011 1110 11rr rbbb
     
    639639    if(REG_R8<=reg&&reg<=REG_R15) RexByte=0x49;
    640640
    641     if(RexByte==-1) SetError(300,NULL,cp);
     641    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    642642
    643643    if(reg==REG_RAX){
     
    679679    }
    680680
    681     if(RexByte==-1) SetError(300,NULL,cp);
     681    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    682682
    683683    //[8bit rex] 0000 0011 11rr rbbb
     
    699699    }
    700700
    701     if(RexByte==-1) SetError(300,NULL,cp);
     701    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    702702
    703703    //[8bit rex] 0000 0011 11rr rbbb
     
    747747    }
    748748
    749     if(RexByte==-1) SetError(300,NULL,cp);
     749    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    750750
    751751    //[8bit rex] 0010 1011 11rr rbbb
     
    767767    }
    768768
    769     if(RexByte==-1) SetError(300,NULL,cp);
     769    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    770770
    771771    //[8bit rex] 0010 1011 11rr rbbb
     
    818818    }
    819819
    820     if(RexByte==-1) SetError(300,NULL,cp);
     820    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    821821
    822822
     
    844844    }
    845845
    846     if(RexByte==-1) SetError(300,NULL,cp);
     846    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    847847
    848848
     
    885885    if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
    886886
    887     if(RexByte==-1) SetError(300,NULL,cp);
     887    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    888888
    889889    //rexプリフィックス
     
    903903    if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x49;
    904904
    905     if(RexByte==-1) SetError(300,NULL,cp);
     905    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    906906
    907907    //rexプリフィックス
     
    939939    }
    940940
    941     if(RexByte==-1) SetError(300,NULL,cp);
     941    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    942942
    943943
     
    973973    }
    974974
    975     if(RexByte==-1) SetError(300,NULL,cp);
     975    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    976976
    977977
     
    10071007    }
    10081008
    1009     if(RexByte==-1) SetError(300,NULL,cp);
     1009    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    10101010
    10111011
     
    10551055    }
    10561056
    1057     if(RexByte==-1) SetError(300,NULL,cp);
     1057    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    10581058
    10591059
     
    10741074    if(REG_R8<=reg&&reg<=REG_R15) (char)RexByte=0x49;
    10751075
    1076     if(RexByte==-1) SetError(300,NULL,cp);
     1076    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    10771077
    10781078    if(reg==REG_RAX){
     
    11011101    if(REG_R8<=reg&&reg<=REG_R15) RexByte=(char)0x41;
    11021102
    1103     if(RexByte==-1) SetError(300,NULL,cp);
     1103    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    11041104
    11051105    if(reg==REG_RAX){
     
    11521152    }
    11531153
    1154     if(RexByte==-1) SetError(300,NULL,cp);
     1154    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    11551155
    11561156
     
    11961196    }
    11971197
    1198     if(RexByte==-1) SetError(300,NULL,cp);
     1198    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    11991199
    12001200
     
    12281228    }
    12291229
    1230     if(RexByte==-1) SetError(300,NULL,cp);
     1230    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    12311231
    12321232
     
    12691269    }
    12701270
    1271     if(RexByte==-1) SetError(300,NULL,cp);
     1271    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    12721272
    12731273    //[8bit rex] 1000 0101 11rr rbbb
     
    13081308    }
    13091309
    1310     if(RexByte==-1) SetError(300,NULL,cp);
     1310    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    13111311
    13121312
     
    14911491    }
    14921492
    1493     if(RexByte==-1) SetError(300,NULL,cp);
     1493    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    14941494
    14951495
     
    15321532    }
    15331533
    1534     if(RexByte==-1) SetError(300,NULL,cp);
     1534    if(RexByte==-1) compiler.errorMessenger.Output(300,NULL,cp);
    15351535
    15361536
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_Calc.cpp

    r463 r468  
    2727    }
    2828    else{
    29         SetError(300,NULL,cp);
     29        compiler.errorMessenger.Output(300,NULL,cp);
    3030    }
    3131}
     
    4343            //ダブルクォートは不正なのでエラー扱い
    4444            variable[i]=0;
    45             SetError(3,variable,cp);
     45            compiler.errorMessenger.Output(3,variable,cp);
    4646            return;
    4747        }
     
    9090            if(GetVarType(variable,Type(),0)){
    9191                //変数リストに該当したとき
    92                 SetError(1,NULL,cp);
     92                compiler.errorMessenger.Output(1,NULL,cp);
    9393            }
    9494            else{
     
    9797                {
    9898                    //定数リストに該当したとき
    99                     SetError(1,NULL,cp);
     99                    compiler.errorMessenger.Output(1,NULL,cp);
    100100                }
    101101                else{
    102102                    //変数リスト、定数リストに該当しないとき
    103                     SetError(3,variable,cp);
     103                    compiler.errorMessenger.Output(3,variable,cp);
    104104                }
    105105            }
     
    123123
    124124    if(Command[i+1]=='\0'){
    125         SetError(1,NULL,cp);
     125        compiler.errorMessenger.Output(1,NULL,cp);
    126126        return;
    127127    }
     
    164164
    165165    if( lstrcmpi( variable, "This" ) == 0 ){
    166         SetError(133,NULL,cp);
     166        compiler.errorMessenger.Output(133,NULL,cp);
    167167        return;
    168168    }
     
    197197    if(reg!=REG_RAX&&calcType.IsWhole()||
    198198        varType.IsNull()||calcType.IsNull()){
    199         SetError(300,NULL,cp);
     199        compiler.errorMessenger.Output(300,NULL,cp);
    200200    }
    201201
     
    207207    if( !TermOpeOnlyVariable( variable, varType, VarRelativeVar, true ) )
    208208    {
    209         SetError();
     209        compiler.errorMessenger.OutputFatalError();
    210210        return;
    211211    }
     
    215215
    216216    if(varType.GetBasicType()&FLAG_PTR){
    217         SetError(14,variable,cp);
     217        compiler.errorMessenger.Output(14,variable,cp);
    218218        return;
    219219    }
     
    243243        compiler.GetObjectModule().meta.GetBlittableTypes().GetClass( calcType ).GetStaticMethods().Enum( "_Create", userProcs );
    244244        if( userProcs.size() != 1 ){
    245             SetError();
     245            compiler.errorMessenger.OutputFatalError();
    246246            return;
    247247        }
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_Calc_PushVar.cpp

    r321 r468  
    1919    }
    2020    else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){
    21         SetError(300,NULL,cp);
     21        compiler.errorMessenger.Output(300,NULL,cp);
    2222    }
    2323    else if(pRelativeVar->dwKind==VAR_LOCAL){
     
    7777    }
    7878    else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){
    79         SetError(300,NULL,cp);
     79        compiler.errorMessenger.Output(300,NULL,cp);
    8080    }
    8181    else if(pRelativeVar->dwKind==VAR_LOCAL){
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_CallProc.cpp

    r463 r468  
    143143                    }
    144144                    else{
    145                         SetError(300,NULL,cp);
     145                        compiler.errorMessenger.Output(300,NULL,cp);
    146146                    }
    147147                }
     
    171171            pMethod = pobj_c->GetStaticMethods().GetMethodPtr( pUserProc );
    172172            if( !pMethod ){
    173                 SetError(300,NULL,cp);
     173                compiler.errorMessenger.Output(300,NULL,cp);
    174174                return false;
    175175            }
     
    189189                //同一クラスオブジェクトの場合はプライベートアクセスを容認する
    190190                if( pMethod->IsNoneAccess() ){
    191                     SetError(109,pUserProc->GetName(),cp);
     191                    compiler.errorMessenger.Output(109,pUserProc->GetName(),cp);
    192192                    return false;
    193193                }
     
    196196                if( pMethod->IsPrivate()
    197197                    || pMethod->IsNoneAccess() ){
    198                     SetError(109,pUserProc->GetName(),cp);
     198                    compiler.errorMessenger.Output(109,pUserProc->GetName(),cp);
    199199                    return false;
    200200                }
    201201                if( !pMethod->GetUserProc().GetParentClass().IsEqualsOrSubClass( pobj_c ) && pMethod->IsProtected() ){
    202                     SetError(110,pUserProc->GetName(),cp);
     202                    compiler.errorMessenger.Output(110,pUserProc->GetName(),cp);
    203203                    return false;
    204204                }
     
    208208            //クラス内部からの呼び出し(継承によるACCESS_NONのみをエラーとする)
    209209            if( pMethod->IsNoneAccess() ){
    210                 SetError(109,pUserProc->GetName(),cp);
     210                compiler.errorMessenger.Output(109,pUserProc->GetName(),cp);
    211211                return false;
    212212            }
     
    329329                if( !resultType.IsObject() )
    330330                {
    331                     SetError();
     331                    compiler.errorMessenger.OutputFatalError();
    332332                }
    333333
     
    373373            if( vtblMasterListIndex != 0 )
    374374            {
    375                 SetError();
     375                compiler.errorMessenger.OutputFatalError();
    376376            }
    377377        }
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_Func.cpp

    r463 r468  
    110110                    || type.IsObjectPtr() && referenceKind == RefPointer ) )
    111111                {
    112                     SetError(104,ObjectName,cp);
     112                    compiler.errorMessenger.Output(104,ObjectName,cp);
    113113                }
    114114
     
    149149            if( vtblMasterListIndex != 0 )
    150150            {
    151                 SetError();
     151                compiler.errorMessenger.OutputFatalError();
    152152            }
    153153        }
     
    248248        {
    249249            extern int cp;
    250             SetError(1,NULL,cp);
     250            compiler.errorMessenger.Output(1,NULL,cp);
    251251            return;
    252252        }
     
    312312        GetOverloadSubHash( name, subs );
    313313        if( subs.size() == 0 ){
    314             SetError(27,name,cp);
     314            compiler.errorMessenger.Output(27,name,cp);
    315315            return;
    316316        }
     
    332332                    ) )
    333333                {
    334                     SetError(67, name, cp );
     334                    compiler.errorMessenger.Output(67, name, cp );
    335335                }
    336336            }
     
    343343                    ) )
    344344                {
    345                     SetError(66, name, cp );
     345                    compiler.errorMessenger.Output(66, name, cp );
    346346                }
    347347            }
     
    349349
    350350        if(!pUserProc){
    351             SetError(27,name,cp);
     351            compiler.errorMessenger.Output(27,name,cp);
    352352            return;
    353353        }
     
    356356        pUserProc=GetSubHash(name);
    357357        if(!pUserProc){
    358             SetError(27,name,cp);
     358            compiler.errorMessenger.Output(27,name,cp);
    359359            return;
    360360        }
     
    383383    Type tempType;
    384384    if( !compiler.StringToType( typeName, tempType ) ){
    385         SetError(3,typeName,cp);
     385        compiler.errorMessenger.Output(3,typeName,cp);
    386386        return;
    387387    }
     
    424424        compiler.codeGenerator.op_mov_RM( sizeof(_int64), REG_RAX, REG_RAX, 0, MOD_BASE );
    425425
    426         SetError(-120,NULL,cp);
     426        compiler.errorMessenger.Output(-120,NULL,cp);
    427427    }*/
    428428}
     
    460460    }
    461461    else{
    462         SetError(134,NULL,cp );
     462        compiler.errorMessenger.Output(134,NULL,cp );
    463463    }
    464464}
     
    545545    }
    546546    if(!tempType.IsWhole()){
    547         SetError(11,Parameter,cp);
     547        compiler.errorMessenger.Output(11,Parameter,cp);
    548548        return;
    549549    }
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_Object.cpp

    r391 r468  
    2222
    2323    if(bSomeObjects){
    24         SetError();
     24        compiler.errorMessenger.OutputFatalError();
    2525        //mov qword ptr[rsp+offset],rbx     ※スタックフレームを利用
    2626        //pobj_sf->push(REG_RBX);
     
    6262        }
    6363        else{
    64             SetError();
     64            compiler.errorMessenger.OutputFatalError();
    6565        }
    6666    }
     
    103103    if( pClass->IsAbstract() ){
    104104        //抽象クラスだったとき
    105         SetError(125,pClass->GetName().c_str(),cp);
     105        compiler.errorMessenger.Output(125,pClass->GetName().c_str(),cp);
    106106    }
    107107
     
    113113        Type tempType;
    114114        NumOpe(&reg,objectSizeStr,Type(),tempType);
    115         if( !tempType.IsWhole() ) SetError(49,NULL,cp);
     115        if( !tempType.IsWhole() ) compiler.errorMessenger.Output(49,NULL,cp);
    116116
    117117        //※添え字上限値であることを考慮
     
    264264        return;
    265265    }
    266     if(!( tempType.IsObjectPtr() || tempType.IsVoidPtr() )) SetError(122,NULL,cp);
     266    if(!( tempType.IsObjectPtr() || tempType.IsVoidPtr() )) compiler.errorMessenger.Output(122,NULL,cp);
    267267
    268268    //sub rax,OBJECT_HEAD_SIZE
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_ProcOp.cpp

    r463 r468  
    119119    }
    120120    else{
    121         SetError();
     121        compiler.errorMessenger.OutputFatalError();
    122122    }
    123123}
     
    164164        {
    165165            if(pGotoLabelSchedule->GetName().size()>0){
    166                 SetError(6,pGotoLabelSchedule->GetName(),pGotoLabelSchedule->GetSourceCodePos());
     166                compiler.errorMessenger.Output(6,pGotoLabelSchedule->GetName(),pGotoLabelSchedule->GetSourceCodePos());
    167167            }
    168168            else{
    169169                char temporary[255];
    170170                sprintf(temporary,"%d",pGotoLabelSchedule->GetLineNum());
    171                 SetError(6,temporary,pGotoLabelSchedule->GetSourceCodePos());
     171                compiler.errorMessenger.Output(6,temporary,pGotoLabelSchedule->GetSourceCodePos());
    172172            }
    173173        }
     
    195195    }
    196196    else{
    197         SetError();
     197        compiler.errorMessenger.OutputFatalError();
    198198    }
    199199}
     
    205205
    206206    if( pUserProc->GetLocalVars().size() ){
    207         SetError();
     207        compiler.errorMessenger.OutputFatalError();
    208208        return;
    209209    }
     
    506506                    }
    507507                    if(!(temporary[0]=='('&&temporary[lstrlen(temporary)-1]==')')){
    508                         SetError(1,NULL,cp);
     508                        compiler.errorMessenger.Output(1,NULL,cp);
    509509                    }
    510510                    RemoveStringPare(temporary);
     
    594594    //With情報のメモリを解放
    595595    for(i3=0;i3<WithInfo.num;i3++){
    596         SetError(22,"With",WithInfo.pWithCp[i3]);
     596        compiler.errorMessenger.Output(22,"With",WithInfo.pWithCp[i3]);
    597597        HeapDefaultFree(WithInfo.ppName[i3]);
    598598    }
     
    651651            SetReg_WholeVariable(returnType,&RelativeVar,REG_RAX);
    652652        }
    653         else SetError(300,NULL,cp);
     653        else compiler.errorMessenger.Output(300,NULL,cp);
    654654    }
    655655
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_Set_Var.cpp

    r308 r468  
    9090    }
    9191
    92     SetError(1,NULL,cp);
     92    compiler.errorMessenger.Output(1,NULL,cp);
    9393}
    9494
     
    113113    }
    114114    else if(pRelative->dwKind==VAR_REFGLOBAL){
    115         SetError(300,NULL,cp);
     115        compiler.errorMessenger.Output(300,NULL,cp);
    116116    }
    117117    else if(pRelative->dwKind==VAR_LOCAL){
     
    178178    }
    179179    else if(pRelative->dwKind==VAR_REFGLOBAL){
    180         SetError(300,NULL,cp);
     180        compiler.errorMessenger.Output(300,NULL,cp);
    181181    }
    182182    else if(pRelative->dwKind==VAR_LOCAL){
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_Statement.cpp

    r436 r468  
    1515            //ダブルクォートは不正なのでエラー扱い
    1616            leftTerm[i]=0;
    17             SetError(3,leftTerm,cp);
     17            compiler.errorMessenger.Output(3,leftTerm,cp);
    1818            return;
    1919        }
     
    4747        (leftTerm[0]==1&&leftTerm[1]==ESC_PSMEM)
    4848        )){
    49         SetError(1,NULL,cp);
     49        compiler.errorMessenger.Output(1,NULL,cp);
    5050        return;
    5151    }
     
    7575        if(pUserProc){
    7676            if( !pUserProc->IsMacro() ){
    77                 SetError(10,Command,cp);
     77                compiler.errorMessenger.Output(10,Command,cp);
    7878            }
    7979
     
    9090
    9191    if( pobj_reg ){
    92         SetError();
     92        compiler.errorMessenger.OutputFatalError();
    9393    }
    9494    pobj_reg=new CRegister(REG_RAX);
     
    118118
    119119    // どこにも当てはまらなかったため、失敗
    120     SetError(1,NULL,cp);
     120    compiler.errorMessenger.Output(1,NULL,cp);
    121121}
    122122
     
    174174    for(int i=0;;i++){
    175175        if(Parameter[i]=='\0'){
    176             SetError(21,NULL,cp);
     176            compiler.errorMessenger.Output(21,NULL,cp);
    177177            return;
    178178        }
     
    314314    compiler.codeGenerator.ContinueAreaBegin();
    315315
    316     if(!Parameter[0]) SetError(10,"While",cp);
     316    if(!Parameter[0]) compiler.errorMessenger.Output(10,"While",cp);
    317317
    318318    //条件式を実行してフラグをセット
     
    353353    i=GetOneParameter(Parameter,0,temporary);
    354354    if(!Parameter[i]){
    355         SetError(12,"For",cp);
     355        compiler.errorMessenger.Output(12,"For",cp);
    356356        isError = true;
    357357        goto ErrorStep;
     
    367367        }
    368368        if(temporary[i2]=='\0'){
    369             SetError(12,"For",cp);
     369            compiler.errorMessenger.Output(12,"For",cp);
    370370            isError = true;
    371371            goto ErrorStep;
     
    386386    if(Parameter[i]){
    387387        i=GetOneParameter(Parameter,i,StepNum);
    388         if(Parameter[i]) SetError(12,"For",cp);
     388        if(Parameter[i]) compiler.errorMessenger.Output(12,"For",cp);
    389389    }
    390390    else lstrcpy(StepNum,"1");
     
    450450    if(szNextVariable[0]){
    451451        if(lstrcmp(szNextVariable,variable)!=0){
    452             SetError(55,szNextVariable,cp);
     452            compiler.errorMessenger.Output(55,szNextVariable,cp);
    453453        }
    454454    }
     
    480480    GetCustomToken( variable, Parameter, i, ESC_IN, true );
    481481    if(!Parameter[i]){
    482         SetError(12,"Foreach",cp);
     482        compiler.errorMessenger.Output(12,"Foreach",cp);
    483483        isError = true;
    484484        goto ErrorStep;
     
    537537    if(szNextVariable[0]){
    538538        if(lstrcmp(szNextVariable,variable)!=0){
    539             SetError(55,szNextVariable,cp);
     539            compiler.errorMessenger.Output(55,szNextVariable,cp);
    540540        }
    541541    }
     
    561561    int i,i2,i3;
    562562
    563     if(Parameter[0]) SetError(10,"Do",cp);
     563    if(Parameter[0]) compiler.errorMessenger.Output(10,"Do",cp);
    564564
    565565    //Continueアドレスのバックアップとセット
     
    641641void OpcodeExitSub(void){
    642642    if( UserProc::IsGlobalAreaCompiling() ){
    643         SetError(12,"Exit Sub/Function",cp);
     643        compiler.errorMessenger.Output(12,"Exit Sub/Function",cp);
    644644        return;
    645645    }
     
    705705            if(basbuf[i]=='\0'){
    706706                selectSchedules.pop_back();
    707                 SetError(22,"Select",cp);
     707                compiler.errorMessenger.Output(22,"Select",cp);
    708708                return;
    709709            }
     
    893893
    894894    if(selectSchedules.back().typeSize==-1){
    895         SetError(30,"Case",cp);
     895        compiler.errorMessenger.Output(30,"Case",cp);
    896896        return;
    897897    }
     
    914914
    915915void OpcodeGosub(char *Parameter){
    916     SetError(-1,"Gosub ~ Returnステートメントは64ビットコンパイラで利用することはできません。",cp);
     916    compiler.errorMessenger.Output(-1,"Gosub ~ Returnステートメントは64ビットコンパイラで利用することはできません。",cp);
    917917}
    918918void OpcodeReturn(char *Parameter){
    919919    if( UserProc::IsGlobalAreaCompiling() ){
    920         SetError(62,NULL,cp);
     920        compiler.errorMessenger.Output(62,NULL,cp);
    921921    }
    922922    else{
     
    966966    i=GetOneParameter(Parameter,0,temporary);
    967967    if(!Parameter[i]){
    968         SetError(1,NULL,cp);
     968        compiler.errorMessenger.Output(1,NULL,cp);
    969969        return;
    970970    }
     
    976976    }
    977977    if(!resultType.IsWhole()){
    978         SetError(11,Parameter,cp);
     978        compiler.errorMessenger.Output(11,Parameter,cp);
    979979        return;
    980980    }
     
    986986    i=GetOneParameter(Parameter,i,temporary);
    987987    if(Parameter[i]){
    988         SetError(1,NULL,cp);
     988        compiler.errorMessenger.Output(1,NULL,cp);
    989989        return;
    990990    }
  • trunk/ab5.0/abdev/BasicCompiler64/Compile_Var.cpp

    r463 r468  
    3232    NumOpe( &reg, lpPtrOffset, Type(), type );
    3333    if( !type.IsWhole() ){
    34         SetError(46,NULL,cp);
     34        compiler.errorMessenger.Output(46,NULL,cp);
    3535    }
    3636    ExtendTypeTo64(type.GetBasicType(),reg);
     
    5252    else{
    5353        //エラー
    54         SetError(1,NULL,cp);
     54        compiler.errorMessenger.Output(1,NULL,cp);
    5555        return;
    5656    }
     
    153153        if( !type.IsWhole() )
    154154        {
    155             SetError(46,NULL,cp);
     155            compiler.errorMessenger.Output(46,NULL,cp);
    156156        }
    157157        ExtendTypeTo64( type.GetBasicType(), reg );
     
    211211    if( !pMember )
    212212    {
    213         if(isErrorEnabled) SetError(103,VarName,cp);
     213        if(isErrorEnabled) compiler.errorMessenger.Output(103,VarName,cp);
    214214        return false;
    215215    }
     
    222222        //同一クラスオブジェクトの場合はプライベートアクセスを容認する
    223223        if(pMember->IsNoneAccess()){
    224             if(isErrorEnabled) SetError(107,VarName,cp);
     224            if(isErrorEnabled) compiler.errorMessenger.Output(107,VarName,cp);
    225225            return false;
    226226        }
     
    229229        if((bPrivateAccess==0&&pMember->IsPrivate())||
    230230            pMember->IsNoneAccess()){
    231             if(isErrorEnabled) SetError(107,VarName,cp);
     231            if(isErrorEnabled) compiler.errorMessenger.Output(107,VarName,cp);
    232232            return false;
    233233        }
    234234        else if(bPrivateAccess==0&&pMember->IsProtected()){
    235             if(isErrorEnabled) SetError(108,VarName,cp);
     235            if(isErrorEnabled) compiler.errorMessenger.Output(108,VarName,cp);
    236236            return false;
    237237        }
     
    245245        ){
    246246            //Const定義の変数に書き込みアクセスをしようとした場合
    247             SetError(61,VarName,cp);
     247            compiler.errorMessenger.Output(61,VarName,cp);
    248248    }
    249249
     
    262262    else{
    263263        if(lpPtrOffset[0]){
    264             if(isErrorEnabled) SetError(16,member,cp);
     264            if(isErrorEnabled) compiler.errorMessenger.Output(16,member,cp);
    265265            return false;
    266266        }
     
    275275        //配列オフセット
    276276        if(!GetArrayOffset(pMember->GetSubscripts(),array,pMember->GetType())){
    277             if(isErrorEnabled) SetError(14,member,cp);
     277            if(isErrorEnabled) compiler.errorMessenger.Output(14,member,cp);
    278278            return false;
    279279        }
     
    288288        if( resultType.IsObject() || resultType.IsStruct() ){
    289289            if( refType != RefDot ){
    290                 if(isErrorEnabled) SetError(104,member,cp);
     290                if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
    291291                return false;
    292292            }
     
    304304                if( ( resultType.IsObjectPtr() || resultType.IsStructPtr() )
    305305                    && refType != RefDot ){
    306                         if(isErrorEnabled) SetError(104,member,cp);
     306                        if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
    307307                        return false;
    308308                }
     
    318318                if( (resultType.IsObjectPtr() || resultType.IsStructPtr() )
    319319                    && refType != RefPointer ){
    320                         if(isErrorEnabled) SetError(104,member,cp);
     320                        if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
    321321                        return false;
    322322                }
     
    332332                //ppObj[n]->member
    333333                if( refType != RefPointer ){
    334                     if(isErrorEnabled) SetError(104,member,cp);
     334                    if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
    335335                    return false;
    336336                }
     
    346346            }
    347347            else{
    348                 if(isErrorEnabled) SetError(104,member,cp);
     348                if(isErrorEnabled) compiler.errorMessenger.Output(104,member,cp);
    349349                return false;
    350350            }
     
    427427            else{
    428428                if(lpPtrOffset[0]){
    429                     SetError(16,variable,cp);
     429                    compiler.errorMessenger.Output(16,variable,cp);
    430430                    pRelativeVar->dwKind=NON_VAR;
    431431                    return false;
     
    507507            compiler.pCompilingClass->IsCompilingDestructor() == false
    508508            ){
    509                 SetError(131, NULL, cp );
     509                compiler.errorMessenger.Output(131, NULL, cp );
    510510        }
    511511
     
    596596        }
    597597
    598         if(isErrorEnabled) SetError(3,variable,cp);
     598        if(isErrorEnabled) compiler.errorMessenger.Output(3,variable,cp);
    599599        pRelativeVar->dwKind=NON_VAR;
    600600        return false;
     
    612612        else{
    613613            if(lpPtrOffset[0]){
    614                 SetError(16,variable,cp);
     614                compiler.errorMessenger.Output(16,variable,cp);
    615615                pRelativeVar->dwKind=NON_VAR;
    616616                return false;
     
    638638        if( resultType.IsObject() ){
    639639            //オブジェクト定数
    640             SetError(130, VarName, cp );
     640            compiler.errorMessenger.Output(130, VarName, cp );
    641641        }
    642642        else{
    643643            //一般のConst変数
    644             SetError(61,VarName,cp);
     644            compiler.errorMessenger.Output(61,VarName,cp);
    645645        }
    646646    }
     
    666666    if(array[0]){
    667667        if(!GetArrayOffset(*pSubscripts,array,resultType)){
    668             SetError(14,variable,cp);
     668            compiler.errorMessenger.Output(14,variable,cp);
    669669            pRelativeVar->dwKind=NON_VAR;
    670670            return false;
     
    675675            //実態オブジェクトのメンバを参照(obj.member)
    676676            if( refType != RefDot ){
    677                 SetError(104,VarName,cp);
     677                compiler.errorMessenger.Output(104,VarName,cp);
    678678                pRelativeVar->dwKind=NON_VAR;
    679679                return false;
     
    690690                //pObj[n].member
    691691                if( refType != RefDot ){
    692                     SetError(104,VarName,cp);
     692                    compiler.errorMessenger.Output(104,VarName,cp);
    693693                    pRelativeVar->dwKind=NON_VAR;
    694694                    return false;
     
    700700                //pObj->member
    701701                if( refType != RefPointer ){
    702                     SetError(104,VarName,cp);
     702                    compiler.errorMessenger.Output(104,VarName,cp);
    703703                    pRelativeVar->dwKind=NON_VAR;
    704704                    return false;
     
    717717                //ppObj[n]->member
    718718                if( refType != RefPointer ){
    719                     SetError(104,VarName,cp);
     719                    compiler.errorMessenger.Output(104,VarName,cp);
    720720                    pRelativeVar->dwKind=NON_VAR;
    721721                    return false;
     
    732732            }
    733733            else{
    734                 SetError(104,VarName,cp);
     734                compiler.errorMessenger.Output(104,VarName,cp);
    735735                pRelativeVar->dwKind=NON_VAR;
    736736                return false;
     
    738738        }
    739739        else{
    740             SetError(102,VarName,cp);
     740            compiler.errorMessenger.Output(102,VarName,cp);
    741741            pRelativeVar->dwKind=NON_VAR;
    742742            return false;
     
    785785                while(1){
    786786                    if( subscripts[0] < i2 ){
    787                         SetError(41,0,cp);
     787                        compiler.errorMessenger.Output(41,0,cp);
    788788                        return 0;
    789789                    }
     
    807807            BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
    808808                if(InitBuf[i]=='\0'){
    809                     SetError(41,0,cp);
     809                    compiler.errorMessenger.Output(41,0,cp);
    810810                    return false;
    811811                }
     
    823823        }
    824824
    825         SetError(41,0,cp);
     825        compiler.errorMessenger.Output(41,0,cp);
    826826        return false;
    827827    }
     
    833833
    834834    if( subscripts.size() > 0 ){
    835         SetError(41,0,cp);
     835        compiler.errorMessenger.Output(41,0,cp);
    836836        return false;
    837837    }
     
    947947                while(1){
    948948                    if( subscripts[0] < i2 ){
    949                         SetError(41,0,cp);
     949                        compiler.errorMessenger.Output(41,0,cp);
    950950                        return 0;
    951951                    }
     
    969969            BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
    970970                if(InitBuf[i]=='\0'){
    971                     SetError(41,0,cp);
     971                    compiler.errorMessenger.Output(41,0,cp);
    972972                    return false;
    973973                }
     
    987987        }
    988988
    989         SetError(41,0,cp);
     989        compiler.errorMessenger.Output(41,0,cp);
    990990        return false;
    991991    }
     
    997997
    998998    if( subscripts.size() > 0 ){
    999         SetError(41,0,cp);
     999        compiler.errorMessenger.Output(41,0,cp);
    10001000        return false;
    10011001    }
     
    11131113        if( UserProc::CompilingUserProc().GetLocalVars().DuplicateCheck( VarName ) ){
    11141114            //2重定義のエラー
    1115             SetError(15,VarName,cp);
     1115            compiler.errorMessenger.Output(15,VarName,cp);
    11161116            return;
    11171117        }
     
    12271227        else{
    12281228            if( subscripts.size() > 1 ){
    1229                 SetError(300,NULL,cp);
     1229                compiler.errorMessenger.Output(300,NULL,cp);
    12301230            }
    12311231            sprintf( objectSize, "%d", subscripts[0] );
     
    12371237        GetVarOffset( true, false, VarName, &RelativeVar, tempType );
    12381238        if( RelativeVar.dwKind == VAR_DIRECTMEM ){
    1239             SetError();
     1239            compiler.errorMessenger.OutputFatalError();
    12401240        }
    12411241        SetVariableFromRax( Type( DEF_OBJECT, *compiler.GetObjectModule().meta.GetClasses().GetObjectClassPtr() ), DEF_OBJECT, &RelativeVar );
     
    12431243}
    12441244void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar){
    1245     if(!IsGeneralReg(reg)) SetError(300,NULL,cp);
     1245    if(!IsGeneralReg(reg)) compiler.errorMessenger.Output(300,NULL,cp);
    12461246
    12471247    if(pRelativeVar->dwKind==VAR_GLOBAL){
     
    13191319    const UserProc *pUserProc_AddGlobalRootPtr = GetClassMethod( "_System_CGarbageCollection", "AddGlobalRootPtr" );
    13201320    if( !pUserProc_AddGlobalRootPtr ){
    1321         SetError(3, "_System_CGarbageCollection.AddGlobalRootPtr", -1 );
     1321        compiler.errorMessenger.Output(3, "_System_CGarbageCollection.AddGlobalRootPtr", -1 );
    13221322        return false;
    13231323    }
  • trunk/ab5.0/abdev/BasicCompiler64/MakePeHdr.cpp

    r460 r468  
    9494    extern int obp_AllocSize;
    9595    extern char *basbuf;
    96     extern char OutputFileName[MAX_PATH];
    9796    int i,i2,i3,i4,i5;
    9897    char temporary[MAX_PATH],*temp2;
     
    325324        // 名前空間が初期化されているかをチェック
    326325        if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() ){
    327             SetError();
     326            compiler.errorMessenger.OutputFatalError();
    328327        }
    329328
     
    409408        //With情報のメモリを解放
    410409        for(i=0;i<WithInfo.num;i++){
    411             SetError(22,"With",WithInfo.pWithCp[i]);
     410            compiler.errorMessenger.Output(22,"With",WithInfo.pWithCp[i]);
    412411            HeapDefaultFree(WithInfo.ppName[i]);
    413412        }
     
    417416        // 名前空間が正しく閉じられているかをチェック
    418417        if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() ){
    419             SetError(63,NULL,-1);
     418            compiler.errorMessenger.Output(63,NULL,-1);
    420419        }
    421420
     
    467466
    468467        // 格納先ディレクトリを作る
    469         Jenga::Common::Path path( OutputFileName );
     468        Jenga::Common::Path path( program.GetOutputFilePath() );
    470469        Jenga::Common::Directory dir( path.GetDriveName() + path.GetDirName(), true );
    471470
    472471        // 書き込む
    473         if( !compiler.GetObjectModule().Write( OutputFileName ) )
     472        if( !compiler.GetObjectModule().Write( program.GetOutputFilePath() ) )
    474473        {
    475474            MessageBox(0,"XML書き込みに失敗","test",0);
     
    478477    }
    479478
    480     extern BOOL bError;
    481     if( !bError )
     479    if( !compiler.errorMessenger.HasError() )
    482480    {
    483         CompileMessage( "リンク中..." );
     481        compiler.messenger.Output( "リンク中..." );
    484482    }
    485483
     
    522520        hLib=LoadLibrary( pDllProc->GetDllFileName().c_str() );
    523521        if(!hLib){
    524             extern char OutputFileName[MAX_PATH];
    525522            char temp2[MAX_PATH],temp3[MAX_PATH];
    526             _splitpath(OutputFileName,temp2,temp3,NULL,NULL);
     523            _splitpath(program.GetOutputFilePath().c_str(),temp2,temp3,NULL,NULL);
    527524            lstrcat(temp2,temp3);
    528525            lstrcpy(temp3,pDllProc->GetDllFileName().c_str());
     
    531528
    532529            if(!hLib){
    533                 SetError(-106,pDllProc->GetDllFileName().c_str(),pDllProc->GetCodePos());
     530                compiler.errorMessenger.Output(-106,pDllProc->GetDllFileName().c_str(),pDllProc->GetCodePos());
    534531            }
    535532        }
     
    538535            if(!GetProcAddress(hLib,pDllProc->GetAlias().c_str())){
    539536                FreeLibrary(hLib);
    540                 SetError(-107,pDllProc->GetAlias(),pDllProc->GetCodePos());
     537                compiler.errorMessenger.Output(-107,pDllProc->GetAlias(),pDllProc->GetCodePos());
    541538            }
    542539            FreeLibrary(hLib);
     
    574571
    575572    if(bUse_ExportSection){
    576         _splitpath(OutputFileName,NULL,NULL,lpExportNames,temporary);
     573        _splitpath(program.GetOutputFilePath().c_str(),NULL,NULL,lpExportNames,temporary);
    577574        lstrcat(lpExportNames,temporary);
    578575        ExportNamesLength=lstrlen(lpExportNames)+1;
     
    700697
    701698        if( pDllProc->GetDllFileName().size() > 16 ){
    702             SetError(7,NULL,cp);
     699            compiler.errorMessenger.Output(7,NULL,cp);
    703700            break;
    704701        }
     
    832829    CDebugSection *pobj_DebugSection;
    833830    pobj_DebugSection=new CDebugSection();
    834     extern BOOL bError;
    835     if( compiler.IsDebug() && bError == 0 )
     831    if( compiler.IsDebug() && !compiler.errorMessenger.HasError() )
    836832    {
    837         CompileMessage( "デバッグ情報を生成しています。" );
     833        compiler.messenger.Output( "デバッグ情報を生成しています。" );
    838834
    839835        pobj_DebugSection->make();
    840836
    841         CompileMessage( "デバッグ情報の生成が完了しました。" );
     837        compiler.messenger.Output( "デバッグ情報の生成が完了しました。" );
    842838    }
    843839
     
    11211117
    11221118
    1123     extern BOOL bError;
    1124     if(bError) goto EndWriteOpcode;
     1119    if( compiler.errorMessenger.HasError() )
     1120    {
     1121        goto EndWriteOpcode;
     1122    }
    11251123
    11261124
     
    14111409
    14121410
    1413     hFile=CreateFile(OutputFileName,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
     1411    hFile=CreateFile(program.GetOutputFilePath().c_str(),GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
    14141412    if(hFile==INVALID_HANDLE_VALUE){
    1415         SetError(53,OutputFileName,-1);
     1413        compiler.errorMessenger.Output(53,program.GetOutputFilePath().c_str(),-1);
    14161414        goto EndWriteOpcode;
    14171415    }
  • trunk/ab5.0/abdev/BasicCompiler64/NumOpe.cpp

    r463 r468  
    177177                // オブジェクトメンバのポインタをraxにコピー
    178178                if( !VarToReg( tempRelativeVar, baseType, resultType ) ){
    179                     SetError(11,termFull,cp);
     179                    compiler.errorMessenger.Output(11,termFull,cp);
    180180                }
    181181            }
     
    220220            if( !leftType.IsStruct() )
    221221            {
    222                 SetError();
     222                compiler.errorMessenger.OutputFatalError();
    223223            }
    224224
     
    344344    {
    345345        // 関数ポインタ
    346         SetError();
     346        compiler.errorMessenger.OutputFatalError();
    347347
    348348        ///////////////////////////////////////////////////////////////////
     
    354354    }
    355355
    356     SetError();
     356    compiler.errorMessenger.OutputFatalError();
    357357
    358358    return false;
     
    412412            if( isProcedureCallOnly )
    413413            {
    414                 SetError(1,NULL,cp);
     414                compiler.errorMessenger.Output(1,NULL,cp);
    415415            }
    416416            return false;
     
    444444        if( compiler.pCompilingClass == NULL )
    445445        {
    446             SetError(142,NULL,cp);
     446            compiler.errorMessenger.Output(142,NULL,cp);
    447447            return false;
    448448        }
     
    475475            //閉じカッコ")"に続く文字がNULLでないとき
    476476            if(termFull[i2+1+i4+1]!='\0'){
    477                 SetError(42,NULL,cp);
     477                compiler.errorMessenger.Output(42,NULL,cp);
    478478            }
    479479
     
    537537
    538538                //閉じカッコ")"に続く文字がNULLでないときはエラーにする
    539                 if(termFull[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
     539                if(termFull[i2+1+i4+1]!='\0') compiler.errorMessenger.Output(42,NULL,cp);
    540540
    541541                //マクロ関数の場合
     
    658658    if( isProcedureCallOnly )
    659659    {
    660         SetError(3, termLeft, cp );
     660        compiler.errorMessenger.Output(3, termLeft, cp );
    661661    }
    662662
     
    687687        // 変数の場合はeaxに変数ポインタを格納する
    688688        if( !VarToReg( relativeVar, baseType, resultType ) ){
    689             SetError(11,term,cp);
     689            compiler.errorMessenger.Output(11,term,cp);
    690690        }
    691691    }
     
    715715    if( pobj_reg )
    716716    {
    717         SetError();
     717        compiler.errorMessenger.OutputFatalError();
    718718    }
    719719
     
    726726    if( !isVariable )
    727727    {
    728         SetError();
     728        compiler.errorMessenger.OutputFatalError();
    729729    }
    730730
     
    753753
    754754    if(expression[0]=='\0'){
    755         SetError(1,NULL,cp);
     755        compiler.errorMessenger.Output(1,NULL,cp);
    756756        return false;
    757757    }
     
    836836
    837837            if( pobj_BlockReg->check(REG_RAX) ){
    838                 SetError();
     838                compiler.errorMessenger.OutputFatalError();
    839839            }
    840840
     
    937937                        else GetCalcName(idCalc,temp2);
    938938                        sprintf(temporary,"Operator %s",temp2);
    939                         SetError(27,temporary,cp);
     939                        compiler.errorMessenger.Output(27,temporary,cp);
    940940                        goto error;
    941941                    }
     
    971971                    }
    972972                    else{
    973                         SetError(3, term, cp );
     973                        compiler.errorMessenger.Output(3, term, cp );
    974974                        goto error;
    975975                    }
     
    997997                        // 拡張版リテラル文字列(エスケープシーケンス可能)
    998998                        if(!RemoveStringQuotes(term+2)){
    999                             SetError(43,NULL,cp);
     999                            compiler.errorMessenger.Output(43,NULL,cp);
    10001000                            goto error;
    10011001                        }
     
    10071007                        // 通常文字列
    10081008                        if(!RemoveStringQuotes(term)){
    1009                             SetError(43,NULL,cp);
     1009                            compiler.errorMessenger.Output(43,NULL,cp);
    10101010                            goto error;
    10111011                        }
     
    10661066                                }
    10671067                            }
    1068                             SetError(38,term,cp);
     1068                            compiler.errorMessenger.Output(38,term,cp);
    10691069
    10701070                            goto error;
     
    10801080                        if( resultType.GetBasicType() & FLAG_CAST ){
    10811081                            // 型名のみ
    1082                             SetError();
     1082                            compiler.errorMessenger.OutputFatalError();
    10831083                        }
    10841084                        else{
     
    11901190                        }
    11911191                        else{
    1192                             SetError(1,NULL,0);
     1192                            compiler.errorMessenger.Output(1,NULL,0);
    11931193                            goto error;
    11941194                        }
     
    11981198                    //該当する識別子が見当たらないときはエラー扱いにする
    11991199                    bError=1;
    1200                     SetError(3,term,cp);
     1200                    compiler.errorMessenger.Output(3,term,cp);
    12011201                    type_stack[sp]=DEF_DOUBLE;
    12021202                }
     
    12351235
    12361236                        if(XmmReg==REG_XMM4){
    1237                             SetError();     // TODO: 未実装
     1237                            compiler.errorMessenger.OutputFatalError();     // TODO: 未実装
    12381238                            //push term
    12391239                            //compiler.codeGenerator.op_push_value(i32data);
     
    13331333                if( PTR_LEVEL( type_stack[sp-1] ) <= 0 ){
    13341334                    //ポインタ型ではないとき
    1335                     SetError( 3, NULL, cp );
     1335                    compiler.errorMessenger.Output( 3, NULL, cp );
    13361336                    goto error;
    13371337                }
     
    13421342
    13431343            default:
    1344                 SetError(300,NULL,cp);
     1344                compiler.errorMessenger.Output(300,NULL,cp);
    13451345                goto error;
    13461346        }
     
    13501350
    13511351    if(sp!=1){
    1352         SetError(1,NULL,cp);
     1352        compiler.errorMessenger.Output(1,NULL,cp);
    13531353        goto error;
    13541354    }
    13551355
    13561356    if(bLiteralCalculation){
    1357         SetError();
     1357        compiler.errorMessenger.OutputFatalError();
    13581358    }
    13591359    else{
  • trunk/ab5.0/abdev/BasicCompiler64/NumOpe_Arithmetic.cpp

    r308 r468  
    178178    if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
    179179        //実数演算は行えないため、エラー扱い
    180         SetError(45,"mod",cp);
     180        compiler.errorMessenger.Output(45,"mod",cp);
    181181        return 0;
    182182    }
     
    357357    if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
    358358        //実数演算は行えないため、エラー扱い
    359         SetError(45,"mod",cp);
     359        compiler.errorMessenger.Output(45,"mod",cp);
    360360        return 0;
    361361    }
     
    625625    if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
    626626        //いずれかの項が実数のとき
    627         SetError(45,"<<",cp);
     627        compiler.errorMessenger.Output(45,"<<",cp);
    628628        return 0;
    629629    }
  • trunk/ab5.0/abdev/BasicCompiler64/NumOpe_Logical.cpp

    r433 r468  
    1515    if(IsRealNumberType(type[sp-2])||IsRealNumberType(type[sp-1])){
    1616        //いずれかの項が実数のとき
    17         SetError(45,"xor",cp);
     17        compiler.errorMessenger.Output(45,"xor",cp);
    1818        return 0;
    1919    }
     
    9494    if(IsRealNumberType(type[sp-1])){
    9595        //実数のとき
    96         SetError(45,"Not",cp);
     96        compiler.errorMessenger.Output(45,"Not",cp);
    9797        return 0;
    9898    }
  • trunk/ab5.0/abdev/BasicCompiler64/NumOpe_TypeOperation.cpp

    r463 r468  
    264264    }
    265265    else{
    266         SetError(300,NULL,cp);
     266        compiler.errorMessenger.Output(300,NULL,cp);
    267267    }
    268268
     
    499499    int castBasicType = type[sp-1];
    500500    if((castBasicType&FLAG_CAST)==0){
    501         SetError(47,NULL,cp);
     501        compiler.errorMessenger.Output(47,NULL,cp);
    502502        return 0;
    503503    }
  • trunk/ab5.0/abdev/BasicCompiler64/OperatorProc.cpp

    r448 r468  
    77
    88void FreeTempObject(int reg,const CClass *pobj_c){
    9     if(!IsSafeReg(reg)) SetError(300,NULL,cp);
     9    if(!IsSafeReg(reg)) compiler.errorMessenger.Output(300,NULL,cp);
    1010
    1111    ////////////////////////////////////////////////
     
    293293        if(bCalcUseHeap){
    294294            //未解放のインスタンスが存在する旨を示す警告
    295             SetError(-105,NULL,cp);
     295            compiler.errorMessenger.Output(-105,NULL,cp);
    296296        }
    297297
     
    325325
    326326    //エラーを発行
    327     SetError(-1,"キャスト演算子がオーバーロードされていません。",cp);
     327    compiler.errorMessenger.Output(-1,"キャスト演算子がオーバーロードされていません。",cp);
    328328}
    329329
  • trunk/ab5.0/abdev/BasicCompiler64/Register.cpp

    r206 r468  
    2020void CBlockReg::lock(int reg){
    2121    if(check(reg)){
    22         SetError(300,NULL,cp);
     22        compiler.errorMessenger.Output(300,NULL,cp);
    2323    }
    2424    array_BlockReg[num++]=reg;
     
    136136
    137137        //エラーチェック
    138         if(pobj_BlockReg->check(AnswerReg)) SetError(300,NULL,cp);
     138        if(pobj_BlockReg->check(AnswerReg)) compiler.errorMessenger.Output(300,NULL,cp);
    139139    }
    140140
     
    186186void CRegister::bug_check(){
    187187    if(init_sp_reg!=sp_UseReg||
    188         init_sp_xmm_reg!=sp_XmmReg) SetError(300,NULL,cp);
     188        init_sp_xmm_reg!=sp_XmmReg) compiler.errorMessenger.Output(300,NULL,cp);
    189189}
    190190int CRegister::GetNextReg(){
  • trunk/ab5.0/abdev/BasicCompiler64/stack_frame.cpp

    r308 r468  
    118118void StackFrame::error_check(){
    119119    if(now_sp){
    120         SetError(300,NULL,cp);
     120        compiler.errorMessenger.Output(300,NULL,cp);
    121121    }
    122122}
  • trunk/ab5.0/abdev/BasicCompiler64/stdafx.h

    r463 r468  
    55#include <vector>
    66#include <fstream>
     7#include <iostream>
    78
    89#include <windows.h>
     
    1415#include <limits.h>
    1516#include <shlobj.h>
    16 #include <iostream>
     17#include <process.h>
    1718
    1819//boost libraries
     
    2223#include <jenga/include/common/File.h>
    2324#include <jenga/include/common/CmdLine.h>
     25#include <jenga/include/common/Path.h>
    2426
    2527#include "../BasicCompiler_Common/common.h"
     
    2931#include <Program.h>
    3032#include <Compiler.h>
     33#include <Debugger.h>
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Messenger.cpp

    r465 r468  
    3131    extern HWND hMainDlg;
    3232    int index = GetWindowTextLength(GetDlgItem(hMainDlg,IDC_ERRORLIST));
    33     return SendMessage(GetDlgItem(hMainDlg,IDC_ERRORLIST),EM_LINEFROMCHAR,index,0);
     33    return static_cast<int>(SendMessage(GetDlgItem(hMainDlg,IDC_ERRORLIST),EM_LINEFROMCHAR,index,0));
    3434}
    3535
Note: See TracChangeset for help on using the changeset viewer.