Ignore:
Timestamp:
Aug 21, 2007, 11:00:25 PM (17 years ago)
Author:
dai_9181
Message:

ジェネリクスのベースを実装

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler32/Compile_Calc.cpp

    r265 r290  
    373373}
    374374
    375 void SetVariableFromEax(int VarType,int CalcType,RELATIVE_VAR *pRelativeVar){
     375void SetVariableFromEax( const Type &varType,int CalcType,RELATIVE_VAR *pRelativeVar){
    376376    /////////////////////////////////////////////////
    377377    // eaxの内容を変数にコピーするコードを抽出
    378378    /////////////////////////////////////////////////
    379379
    380     if(VarType==DEF_BOOLEAN){
     380    if( varType.IsBoolean() )
     381    {
    381382        //bool
    382383        SetBooleanVariable(CalcType,pRelativeVar);
    383384    }
    384     else if( IsRealNumberType( VarType ) ){
     385    else if( varType.IsReal() )
     386    {
    385387        // Double/Single型変数へレジスタの値を代入
    386         SetRealVariable(VarType, CalcType, pRelativeVar);
    387     }
    388     else if( IsWholeNumberType( VarType ) || VarType == DEF_OBJECT ){
    389         int typeSize = GetTypeSize( VarType, -1 );
     388        SetRealVariable(varType.GetBasicType(), CalcType, pRelativeVar);
     389    }
     390    else if( varType.IsWhole() || varType.IsObject() )
     391    {
     392        int typeSize = varType.GetSize();
    390393
    391394        //整数変数へraxの値を格納する
     
    640643    RestoreDefaultRegisterFromStackMemory( calcType.GetBasicType() );
    641644
    642     SetVariableFromEax(varType.GetBasicType(),calcType.GetBasicType(),&VarRelativeVar);
    643 }
     645    SetVariableFromEax(varType,calcType.GetBasicType(),&VarRelativeVar);
     646}
Note: See TracChangeset for help on using the changeset viewer.