Changeset 290 in dev for trunk/abdev/BasicCompiler32/NumOpe_Arithmetic.cpp
- Timestamp:
- Aug 21, 2007, 11:00:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/NumOpe_Arithmetic.cpp
r225 r290 217 217 } 218 218 219 if( GetTypeSize(type[sp-2],-1)==sizeof(_int64)){219 if(Type(type[sp-2],-1).GetSize()==sizeof(_int64)){ 220 220 if(AnswerType==DEF_SINGLE){ 221 221 //add esp,4 … … 652 652 } 653 653 //↓ここだけ例外DWord 654 if( GetTypeSize(type[sp-2],-1)==sizeof(_int64)||type[sp-2]==DEF_DWORD){654 if(Type(type[sp-2],-1).GetSize()==sizeof(_int64)||type[sp-2]==DEF_DWORD){ 655 655 if(AnswerType==DEF_SINGLE){ 656 656 //add esp,4 … … 997 997 sp=*pStackPointer; 998 998 999 int CastType; 1000 CastType=type[sp-1]; 1001 if((CastType&FLAG_CAST)==0){ 999 int castBasicType = type[sp-1]; 1000 if((castBasicType&FLAG_CAST)==0){ 1002 1001 SetError(47,NULL,cp); 1003 1002 return 0; 1004 1003 } 1005 CastType=CastType&(~FLAG_CAST); 1006 1007 if(IsPtrType(CastType)){ 1008 ChangeTypeToLong(type[sp-2]); 1009 } 1010 else if(IsRealNumberType(CastType)){ 1011 if(CastType==DEF_DOUBLE) ChangeTypeToDouble(type[sp-2]); 1012 else if(CastType==DEF_SINGLE) ChangeTypeToSingle(type[sp-2]); 1013 } 1014 else ChangeTypeToWhole(type[sp-2],CastType); 1015 1016 type[sp-2]=CastType; 1017 index_stack[sp-2]=index_stack[sp-1]; 1004 castBasicType = castBasicType&(~FLAG_CAST); 1005 1006 Type oldType( type[sp-2], index_stack[sp-2] ); 1007 Type castType( castBasicType, index_stack[sp-1] ); 1008 1009 if( castType.IsPointer() ) 1010 { 1011 ChangeTypeToLong( oldType.GetBasicType() ); 1012 } 1013 else if( castType.IsReal() ) 1014 { 1015 if( castType.IsDouble() ) 1016 { 1017 ChangeTypeToDouble( oldType.GetBasicType() ); 1018 } 1019 else if( castType.IsSingle() ) 1020 { 1021 ChangeTypeToSingle( oldType.GetBasicType() ); 1022 } 1023 } 1024 else 1025 { 1026 ChangeTypeToWhole( oldType, castType ); 1027 } 1028 1029 type[sp-2] = castType.GetBasicType(); 1030 index_stack[sp-2] = castType.GetIndex(); 1018 1031 1019 1032 sp--;
Note:
See TracChangeset
for help on using the changeset viewer.