Changeset 45 in dev for BasicCompiler32


Ignore:
Timestamp:
Feb 2, 2007, 2:58:14 AM (17 years ago)
Author:
dai_9181
Message:

・オーバーロードが解決できない場合のエラーが表示されないバグを修正。
・DLL関数のByRefパラメータに変数以外の数値を指定すると正常にコンパイルされないバグを修正。

Location:
BasicCompiler32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler32/CParameter.cpp

    r36 r45  
    395395                //↑ここでスタックに積む
    396396
    397                 useTempParameters[i2] = true;
    398                 useTempObject = true;
    399 
    400                 types[i2].type = type;
    401                 types[i2].u.lpIndex = lpVarIndex;
     397                bool result = CheckDifferentType(
     398                    DummyTypeInfo.type,
     399                    DummyTypeInfo.u.lpIndex,
     400                    type,
     401                    lpVarIndex,
     402                    FuncName,
     403                    i2);
     404
     405                if( result ){
     406                    useTempParameters[i2] = true;
     407                    useTempObject = true;
     408
     409                    types[i2].type = type;
     410                    types[i2].u.lpIndex = lpVarIndex;
     411                }
    402412
    403413                nCountOfTempObjects++;
     
    430440            //call destructor
    431441            int i5 = types[i2].u.pobj_Class->DestructorMemberSubIndex;
    432             op_call( types[i2].u.pobj_Class->ppobj_Method[i5]->psi );
     442            if( i5 != -1 ){
     443                op_call( types[i2].u.pobj_Class->ppobj_Method[i5]->psi );
     444            }
    433445
    434446
  • BasicCompiler32/Compile_CallProc.cpp

    r40 r45  
    357357
    358358    //エラーチェック
    359     if( !pobj_parameter->ErrorCheck(psi->name,psi->pRealParmInfo,psi->RealParmNum,psi->RealSecondParmNum) ){
     359    if( !pobj_parameter->ErrorCheck(psi->name,psi->pRealParmInfo,psi->RealParmNum,psi->SecondParmNum) ){
    360360        //パラメータにエラーがあるときは処理を終える
    361361        return;
     
    524524    }
    525525
     526    //一時オブジェクトを生成
     527    pobj_parameter->NewTempParameters( pdi->name,pdi->pParmInfo,pdi->ParmNum,pdi->ParmNum );
     528
    526529    //レジスタ、スタックフレームにセット
    527530    int ParmSize;
    528531    ParmSize=pobj_parameter->SetParameter(pdi->name,pdi->pParmInfo,pdi->ParmNum,pdi->ParmNum);
    529 
    530     //パラメータオブジェクトを破棄
    531     delete pobj_parameter;
    532532
    533533
     
    545545    }
    546546
     547    //一時オブジェクトを破棄
     548    pobj_parameter->DeleteTempParameters();
     549
     550    //パラメータオブジェクトを破棄
     551    delete pobj_parameter;
     552
    547553    if(plpIndex) *plpIndex=pdi->u.ReturnIndex;
    548554
Note: See TracChangeset for help on using the changeset viewer.