Changeset 55 in dev for BasicCompiler32/Compile_Calc.cpp
- Timestamp:
- Feb 13, 2007, 3:14:57 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Calc.cpp
r46 r55 78 78 //符号あり 79 79 80 if(OldType==DEF_INTEGER ){80 if(OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)){ 81 81 //pop eax 82 82 op_pop(REG_EAX); … … 90 90 op_push(REG_EAX); 91 91 } 92 else if(OldType==DEF_ CHAR){92 else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){ 93 93 //pop eax 94 94 op_pop(REG_EAX); … … 170 170 //符号あり 171 171 172 if(OldType==DEF_INTEGER ){172 if(OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)){ 173 173 //pop eax 174 174 op_pop(REG_EAX); … … 182 182 op_push(REG_EAX); 183 183 } 184 else if(OldType==DEF_ CHAR){184 else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){ 185 185 //pop eax 186 186 op_pop(REG_EAX); … … 320 320 if(OldType==DEF_BOOLEAN|| 321 321 OldType==DEF_BYTE|| 322 OldType==DEF_WORD||OldType==DEF_INTEGER ) return;323 else if(OldType==DEF_ CHAR){322 OldType==DEF_WORD||OldType==DEF_INTEGER || (isUnicode&&OldType==DEF_CHAR)) return; 323 else if(OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)){ 324 324 //pop eax 325 325 op_pop(REG_EAX); … … 350 350 void ChangeTypeToByte(int OldType){ 351 351 //現在のスタックの内容をbyte型に変換する 352 if(OldType==DEF_BYTE||OldType==DEF_ CHAR) return;352 if(OldType==DEF_BYTE||OldType==DEF_SBYTE || (isUnicode==false&&OldType==DEF_CHAR)) return; 353 353 354 354 ChangeTypeToLong(OldType); … … 572 572 SetBooleanVariable(CalcType,&VarRelativeVar); 573 573 } 574 else if(VarType==DEF_ CHAR||VarType==DEF_BYTE){574 else if(VarType==DEF_SBYTE||VarType==DEF_BYTE || (isUnicode==false&&VarType==DEF_CHAR)){ 575 575 //8ビット整数型変数へスタックの内容を格納する 576 576 Set8Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); 577 577 } 578 else if(VarType==DEF_INTEGER||VarType==DEF_WORD ){578 else if(VarType==DEF_INTEGER||VarType==DEF_WORD || (isUnicode&&VarType==DEF_CHAR)){ 579 579 //16ビット整数型変数へスタックの内容を格納する 580 580 Set16Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); … … 687 687 SetBooleanVariable(CalcType,&VarRelativeVar); 688 688 } 689 else if(VarType==DEF_ CHAR||VarType==DEF_BYTE){689 else if(VarType==DEF_SBYTE||VarType==DEF_BYTE || (isUnicode==false&&VarType==DEF_CHAR)){ 690 690 //8ビット整数型変数へスタックの内容を格納する 691 691 Set8Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); 692 692 } 693 else if(VarType==DEF_INTEGER||VarType==DEF_WORD ){693 else if(VarType==DEF_INTEGER||VarType==DEF_WORD || (isUnicode&&VarType==DEF_CHAR)){ 694 694 //16ビット整数型変数へスタックの内容を格納する 695 695 Set16Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset);
Note:
See TracChangeset
for help on using the changeset viewer.