Changeset 290 in dev for trunk/abdev/BasicCompiler32/Compile_Calc.cpp
- Timestamp:
- Aug 21, 2007, 11:00:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/Compile_Calc.cpp
r265 r290 373 373 } 374 374 375 void SetVariableFromEax( int VarType,int CalcType,RELATIVE_VAR *pRelativeVar){375 void SetVariableFromEax( const Type &varType,int CalcType,RELATIVE_VAR *pRelativeVar){ 376 376 ///////////////////////////////////////////////// 377 377 // eaxの内容を変数にコピーするコードを抽出 378 378 ///////////////////////////////////////////////// 379 379 380 if(VarType==DEF_BOOLEAN){ 380 if( varType.IsBoolean() ) 381 { 381 382 //bool 382 383 SetBooleanVariable(CalcType,pRelativeVar); 383 384 } 384 else if( IsRealNumberType( VarType ) ){ 385 else if( varType.IsReal() ) 386 { 385 387 // 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(); 390 393 391 394 //整数変数へraxの値を格納する … … 640 643 RestoreDefaultRegisterFromStackMemory( calcType.GetBasicType() ); 641 644 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.