Changeset 76 in dev for BasicCompiler32/Compile_Statement.cpp
- Timestamp:
- Mar 21, 2007, 9:26:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/Compile_Statement.cpp
r75 r76 71 71 } 72 72 73 74 73 int idProc; 75 void *p Info;76 idProc=GetProc(buffer, &pInfo);74 void *pProc; 75 idProc=GetProc(buffer,(void **)&pProc); 77 76 78 77 int i4; … … 92 91 //////////////// 93 92 94 LONG_PTR lp;95 i2=CallProc(idProc,pInfo,buffer,temp2,&lp);93 Type resultType; 94 CallProc(idProc,pProc,buffer,temp2,resultType); 96 95 97 96 … … 100 99 ///////////////////// 101 100 102 if( i2==DEF_DOUBLE||i2==DEF_SINGLE){101 if( resultType.IsReal() ){ 103 102 //fstp st(0) 104 103 OpBuffer[obp++]=(char)0xDD; 105 104 OpBuffer[obp++]=(char)0xD8; 106 105 } 107 if(i2==DEF_STRUCT){106 else if( resultType.IsStruct() ){ 108 107 //mov ebx,eax 109 108 op_mov_RR(REG_EBX,REG_EAX); 110 109 111 FreeTempObject(REG_EBX, (CClass *)lp);110 FreeTempObject(REG_EBX,&resultType.GetClass()); 112 111 } 113 112 return; … … 122 121 123 122 void OpcodeIf(char *Parameter){ 124 int i,i2,i3,i4,type; 123 int i,i2,i3,i4; 124 Type tempType; 125 125 126 126 for(i=0;;i++){ … … 135 135 } 136 136 137 type=NumOpe(Parameter,0,0,0); 138 139 if(type==-1){ 137 if( !NumOpe(Parameter,Type(),tempType) ){ 140 138 //NumOpe内でエラー 141 139 i3=-1; //ダミー 142 140 } 143 else if( type==DEF_DOUBLE){141 else if( tempType.IsDouble() ){ 144 142 //fld qword ptr[esp] 145 143 op_fld_ptr_esp(DEF_DOUBLE); … … 175 173 i3=obp; 176 174 } 177 else if( type==DEF_SINGLE){175 else if( tempType.IsSingle() ){ 178 176 //fld dword ptr[esp] 179 177 op_fld_ptr_esp(DEF_SINGLE); … … 209 207 i3=obp; 210 208 } 211 else if( type==DEF_INT64||type==DEF_QWORD){209 else if( tempType.Is64() ){ 212 210 //64ビット型 213 211 … … 383 381 void OpcodeWhile(char *Parameter){ 384 382 extern HANDLE hHeap; 385 int i2,i3 ,type;383 int i2,i3 = 0; 386 384 387 385 //Continueアドレスのバックアップとセット … … 392 390 393 391 if(!Parameter[0]) SetError(10,"While",cp); 394 type=NumOpe(Parameter,0,0,0);395 392 396 393 int je_schedule; 397 if(type==DEF_DOUBLE){ 394 Type tempType; 395 if( !NumOpe(Parameter,Type(),tempType) ){ 396 //ダミー 397 i3=-1; 398 } 399 else if( tempType.IsDouble() ){ 398 400 //fld qword ptr[esp] 399 401 op_fld_ptr_esp(DEF_DOUBLE); … … 429 431 je_schedule=obp; 430 432 } 431 else if( type==DEF_SINGLE){433 else if( tempType.IsSingle() ){ 432 434 //fld dword ptr[esp] 433 435 op_fld_ptr_esp(DEF_SINGLE); … … 463 465 je_schedule=obp; 464 466 } 465 else if( type==DEF_INT64||type==DEF_QWORD){467 else if( tempType.Is64() ){ 466 468 //64ビット型 467 469 … … 533 535 534 536 obj_LexScopes.CallDestructorsOfScopeEnd(); 537 538 if( i3 == -1 ){ 539 return; 540 } 535 541 536 542 //jmp ... … … 605 611 //増加か減少かを区別する 606 612 sprintf(temporary,"(%s)>=0",StepNum); 607 NumOpe(temporary, 0,0,0);613 NumOpe(temporary,Type(),Type()); 608 614 609 615 //pop eax … … 623 629 //判定(カウンタ増加の場合) 624 630 sprintf(temporary,"%s<=(%s)",variable,JudgeNum); 625 NumOpe(temporary, 0,0,0);631 NumOpe(temporary,Type(),Type()); 626 632 627 633 //pop eax … … 637 643 //判定(カウンタ減少の場合) 638 644 sprintf(temporary,"%s>=(%s)",variable,JudgeNum); 639 NumOpe(temporary, 0,0,0);645 NumOpe(temporary,Type(),Type()); 640 646 641 647 //pop eax … … 687 693 void OpcodeDo(char *Parameter){ 688 694 extern HANDLE hHeap; 689 int i,i2,i3,i4 ,type;695 int i,i2,i3,i4; 690 696 691 697 if(Parameter[0]) SetError(10,"Do",cp); … … 724 730 } 725 731 726 type=NumOpe(temporary,0,0,0); 727 728 if(type==DEF_DOUBLE){ 732 Type tempType; 733 NumOpe(temporary,Type(),tempType); 734 735 if( tempType.IsDouble() ){ 729 736 //fld qword ptr[esp] 730 737 op_fld_ptr_esp(DEF_DOUBLE); … … 767 774 } 768 775 } 769 else if( type==DEF_SINGLE){776 else if( tempType.IsSingle() ){ 770 777 //fld dword ptr[esp] 771 778 op_fld_ptr_esp(DEF_SINGLE); … … 808 815 } 809 816 } 810 else if( type==DEF_INT64||type==DEF_QWORD){817 else if( tempType.Is64() ){ 811 818 //64ビット型 812 819 … … 933 940 extern HANDLE hHeap; 934 941 935 extern BOOL bCompilingGlobal; 936 if(bCompilingGlobal){ 942 if( UserProc::IsGlobalAreaCompiling() ){ 937 943 SetError(12,"Exit Sub/Function",cp); 938 944 return; … … 963 969 964 970 int CaseTypeSize; 965 void OpcodeSelect(const char *lpszPar ams){971 void OpcodeSelect(const char *lpszParms){ 966 972 extern DWORD *pCaseSchedule; 967 973 extern int CaseScheduleNum; … … 970 976 extern HANDLE hHeap; 971 977 extern char *basbuf; 972 int i,i2,i3,sw, type1,type2,NowCaseCp;978 int i,i2,i3,sw,NowCaseCp; 973 979 char temporary[VN_SIZE]; 974 980 … … 986 992 NowCaseSchedule=0; 987 993 988 LONG_PTR lpIndex; 989 type1=NumOpe(lpszParams,0,0,&lpIndex); 990 if(type1==DEF_INTEGER|| 991 type1==DEF_WORD|| 992 type1==DEF_SBYTE|| 993 type1==DEF_BYTE|| 994 type1==DEF_BOOLEAN|| 995 type1==DEF_CHAR) CaseTypeSize=sizeof(long); 996 else{ 997 CaseTypeSize=GetTypeSize(type1,lpIndex); 998 if(type1==DEF_OBJECT) CaseTypeSize=PTR_SIZE; 994 Type type1; 995 if( !NumOpe(lpszParms,Type(), type1 ) ){ 996 return; 997 } 998 999 CaseTypeSize = type1.GetSize(); 1000 if( CaseTypeSize < sizeof(long) ){ 1001 CaseTypeSize=sizeof(long); 999 1002 } 1000 1003 … … 1067 1070 cp=NowCaseCp; 1068 1071 1069 LONG_PTR lpIndex2; 1070 type2=NumOpe(temporary,type1,lpIndex,&lpIndex2); 1072 Type type2; 1073 if( !NumOpe(temporary,type1,type2) ){ 1074 return; 1075 } 1071 1076 1072 1077 cp=i2; 1073 1078 1074 if(type1==DEF_OBJECT){ 1075 CClass *pobj_c; 1076 pobj_c=(CClass *)lpIndex; 1077 1079 if(type1.IsObject()){ 1078 1080 std::vector<UserProc *> subs; 1079 pobj_c->EnumMethod( CALC_EQUAL, subs );1081 type1.GetClass().EnumMethod( CALC_EQUAL, subs ); 1080 1082 if( subs.size() == 0 ){ 1081 1083 return; … … 1083 1085 1084 1086 Parameters params; 1085 params.push_back( new Parameter( "", Type( type2 , lpIndex2) ) );1087 params.push_back( new Parameter( "", Type( type2 ) ) ); 1086 1088 1087 1089 //オーバーロードを解決 … … 1121 1123 obp+=sizeof(long); 1122 1124 } 1123 else if(type1 ==DEF_DOUBLE){1124 ChangeTypeToDouble(type2 );1125 else if(type1.IsDouble()){ 1126 ChangeTypeToDouble(type2.GetBasicType()); 1125 1127 1126 1128 //fld qword ptr[esp] … … 1152 1154 obp+=sizeof(long); 1153 1155 } 1154 else if(type1 ==DEF_SINGLE){1155 ChangeTypeToSingle(type2 );1156 else if(type1.IsSingle()){ 1157 ChangeTypeToSingle(type2.GetBasicType()); 1156 1158 1157 1159 //fld dword ptr[esp] … … 1314 1316 } 1315 1317 void OpcodeReturn(char *Parameter){ 1316 extern BOOL bCompilingGlobal; 1317 if(bCompilingGlobal){ 1318 if( UserProc::IsGlobalAreaCompiling() ){ 1318 1319 //Gosub~Returnとして扱う 1319 1320 … … 1324 1325 //戻り値をセット 1325 1326 if(Parameter[0]){ 1326 extern UserProc *pCompilingUserProc; 1327 UserProc &proc = UserProc::CompilingUserProc(); 1328 1327 1329 const char *temp = "_System_ReturnValue"; 1328 if(p CompilingUserProc->GetName()[0]==1&&pCompilingUserProc->GetName()[1]==ESC_OPERATOR)1330 if(proc.GetName()[0]==1&&proc.GetName()[1]==ESC_OPERATOR) 1329 1331 { 1330 1332 } 1331 else temp=pCompilingUserProc->GetName().c_str(); 1333 else{ 1334 temp=proc.GetName().c_str(); 1335 } 1332 1336 1333 1337 char temporary[VN_SIZE]; … … 1341 1345 } 1342 1346 1343 void Opcode_Input(const char *Parameter){1344 extern int cp;1345 int i2,i3,i4,i5,type;1346 BOOL bFile;1347 char temporary[VN_SIZE],temp2[VN_SIZE],buffer[VN_SIZE];1348 1349 if(Parameter[0]=='#'){1350 bFile=1;1351 for(i2=0,i3=1;;i2++,i3++){1352 buffer[i2]=Parameter[i3];1353 if(Parameter[i3]==','||Parameter[i3]=='\0') break;1354 }1355 buffer[i2+1]=0;1356 i2=i3+1;1357 }1358 else{1359 bFile=0;1360 i2=0;1361 buffer[0]=0;1362 1363 //表示用文字列パラメータをセット1364 if(Parameter[0]=='\"'){1365 buffer[0]='\"';1366 for(i2=1;;i2++){1367 if(Parameter[i2]=='\"'){1368 buffer[i2]=0;1369 break;1370 }1371 buffer[i2]=Parameter[i2];1372 }1373 if(Parameter[i2+1]==';') lstrcpy(buffer+i2,"? \"");1374 else if(Parameter[i2+1]==',') lstrcpy(buffer+i2,"\"");1375 else SetError(10,"Input",cp);1376 i2+=2;1377 }1378 else if((Parameter[0]=='e'||Parameter[0]=='E')&&1379 (Parameter[1]=='x'||Parameter[1]=='X')&&1380 Parameter[2]=='\"'){1381 memcpy(buffer,Parameter,3);1382 for(i2=3;;i2++){1383 if(Parameter[i2]=='\"'){1384 buffer[i2]=0;1385 break;1386 }1387 buffer[i2]=Parameter[i2];1388 }1389 if(Parameter[i2+1]==';') lstrcpy(buffer+i2,"? \"");1390 else if(Parameter[i2+1]==',') lstrcpy(buffer+i2,"\"");1391 else SetError(10,"Input",cp);1392 i2+=2;1393 }1394 else{1395 lstrcpy(buffer,"\"? \"");1396 i2=0;1397 }1398 }1399 1400 //変数ポインタ、変数のタイプをセット1401 i4=0;1402 while(1){1403 for(i3=0;;i2++,i3++){1404 if(Parameter[i2]=='('){1405 i5=GetStringInPare(temporary+i3,Parameter+i2);1406 i2+=i5-1;1407 i3+=i5-1;1408 }1409 if(Parameter[i2]=='['){1410 i5=GetStringInBracket(temporary+i3,Parameter+i2);1411 i2+=i5-1;1412 i3+=i5-1;1413 }1414 if(Parameter[i2]==','){1415 temporary[i3]=0;1416 i2++;1417 break;1418 }1419 temporary[i3]=Parameter[i2];1420 if(Parameter[i2]=='\0') break;1421 }1422 if(temporary[0]=='\0'){1423 SetError(10,"Input",cp);1424 return;1425 }1426 1427 LONG_PTR lpIndex;1428 type = GetVarType(temporary,&lpIndex,1);1429 1430 sprintf(temp2,"_System_InputDataPtr[%d]=VarPtr(%s)",i4,temporary);1431 OpcodeCalc(temp2);1432 1433 if(type==DEF_LONG) type=DEF_DWORD;1434 else if(type==DEF_INTEGER) type=DEF_WORD;1435 else if(type==DEF_OBJECT){1436 CClass *pobj_Class=(CClass *)lpIndex;1437 if(lstrcmp(pobj_Class->name,"String")==0) type=DEF_STRING;1438 }1439 sprintf(temp2,"_System_InputDataType[%d]=%d",i4,type);1440 OpcodeCalc(temp2);1441 1442 i4++;1443 if(Parameter[i2]=='\0') break;1444 }1445 sprintf(temp2,"_System_InputDataPtr[%d]=0",i4);1446 OpcodeCalc(temp2);1447 1448 UserProc *pUserProc;1449 if(bFile) pUserProc=GetSubHash("INPUT_FromFile");1450 else pUserProc=GetSubHash("INPUT_FromPrompt");1451 if(!pUserProc){1452 SetError(3,"Input",cp);1453 return;1454 }1455 Opcode_CallProc(buffer,pUserProc,0,"",0);1456 }1457 void Opcode_PrintUsing(const char *Parameter,char *buffer,BOOL bFile){1458 extern int cp;1459 int i2,i3,i4,i5;1460 char temporary[VN_SIZE],temp2[8192];1461 BOOL bReturnLine;1462 1463 char parms[8192];1464 lstrcpy( parms, Parameter );1465 1466 i2=lstrlen(parms);1467 if(parms[i2-1]==';'){1468 bReturnLine=0;1469 parms[i2-1]=0;1470 }1471 else bReturnLine=1;1472 1473 i3=lstrlen(buffer);1474 for(i2=0;;i2++,i3++){1475 if(parms[i2]==';'){1476 buffer[i3]=0;1477 break;1478 }1479 buffer[i3]=parms[i2];1480 if(parms[i2]=='\0') break;1481 }1482 if(parms[i2]==';') i2++;1483 1484 if(bReturnLine) lstrcat(buffer,"+Ex\"\\r\\n\"");1485 1486 //データポインタ、データのタイプをセット1487 i4=0;1488 while(1){1489 for(i3=0;;i2++,i3++){1490 if(parms[i2]=='\"'){1491 temporary[i3]=parms[i2];1492 for(i2++,i3++;;i2++,i3++){1493 temporary[i3]=parms[i2];1494 if(parms[i2]=='\"') break;1495 }1496 continue;1497 }1498 if(parms[i2]=='('){1499 i5=GetStringInPare(temporary+i3,parms+i2);1500 i2+=i5-1;1501 i3+=i5-1;1502 continue;1503 }1504 if(parms[i2]=='['){1505 i5=GetStringInBracket(temporary+i3,parms+i2);1506 i2+=i5-1;1507 i3+=i5-1;1508 continue;1509 }1510 if(parms[i2]==','){1511 temporary[i3]=0;1512 i2++;1513 break;1514 }1515 temporary[i3]=parms[i2];1516 if(parms[i2]=='\0') break;1517 }1518 if(temporary[0]=='\0'){1519 SetError(10,"Print",cp);1520 return;1521 }1522 1523 int iResult;1524 iResult=IsStrCalculation(temporary);1525 1526 if(iResult==1){1527 //文字列1528 sprintf(temp2,"_System_UsingStrData[%d]=%s",i4,temporary);1529 OpcodeCalc(temp2);1530 1531 sprintf(temp2,"_System_UsingDataType[%d]=%d",i4,DEF_STRING);1532 OpcodeCalc(temp2);1533 }1534 else if(iResult==0){1535 //数値1536 sprintf(temp2,"_System_UsingDblData[%d]=%s",i4,temporary);1537 OpcodeCalc(temp2);1538 1539 sprintf(temp2,"_System_UsingDataType[%d]=%d",i4,DEF_DOUBLE);1540 OpcodeCalc(temp2);1541 }1542 //else if(iResult==-1) エラー1543 1544 i4++;1545 if(parms[i2]=='\0') break;1546 }1547 sprintf(temp2,"_System_UsingDataType[%d]=-1",i4);1548 OpcodeCalc(temp2);1549 1550 UserProc *pUserProc;1551 if(bFile) pUserProc=GetSubHash("PRINTUSING_ToFile");1552 else pUserProc=GetSubHash("PRINTUSING_ToPrompt");1553 if(!pUserProc){1554 SetError(3,"Print",cp);1555 return;1556 }1557 Opcode_CallProc(buffer,pUserProc,0,"",0);1558 }1559 void Opcode_Print(const char *Parameter,BOOL bWrite){1560 int i2,i3,i4,sw;1561 char temporary[VN_SIZE],buffer[VN_SIZE];1562 BOOL bFile;1563 1564 if(Parameter[0]=='#'){1565 bFile=1;1566 for(i2=0,i3=1;;i2++,i3++){1567 buffer[i2]=Parameter[i3];1568 if(Parameter[i3]==','||Parameter[i3]=='\0') break;1569 }1570 buffer[i2+1]=0;1571 if(Parameter[i3]==',') i3++;1572 i2=i3;1573 }1574 else{1575 bFile=0;1576 i2=0;1577 buffer[0]=0;1578 }1579 if(Parameter[i2]==1&&Parameter[i2+1]==ESC_USING){1580 Opcode_PrintUsing(Parameter+i2+2,buffer,bFile);1581 return;1582 }1583 1584 lstrcat(buffer,"_System_DummyStr+");1585 1586 sw=1;1587 while(1){1588 for(i3=0;;i2++,i3++){1589 if(Parameter[i2]=='\"'){1590 temporary[i3]=Parameter[i2];1591 for(i2++,i3++;;i2++,i3++){1592 temporary[i3]=Parameter[i2];1593 if(Parameter[i2]=='\"') break;1594 }1595 continue;1596 }1597 if(Parameter[i2]=='('){1598 i4=GetStringInPare(temporary+i3,Parameter+i2);1599 i2+=i4-1;1600 i3+=i4-1;1601 continue;1602 }1603 if(Parameter[i2]=='['){1604 i4=GetStringInBracket(temporary+i3,Parameter+i2);1605 i2+=i4-1;1606 i3+=i4-1;1607 continue;1608 }1609 if(Parameter[i2]==','||Parameter[i2]==';'){1610 temporary[i3]=0;1611 break;1612 }1613 temporary[i3]=Parameter[i2];1614 if(Parameter[i2]=='\0') break;1615 }1616 1617 if(temporary[0]=='\0') lstrcat(buffer,"\"\"");1618 else{1619 int iResult;1620 iResult=IsStrCalculation(temporary);1621 if(iResult==-1){1622 //エラー1623 lstrcat(buffer,"\"\"");1624 }1625 else if(iResult){1626 //文字列1627 lstrcat(buffer,temporary);1628 }1629 else{1630 //数値1631 sprintf(buffer+lstrlen(buffer),"Str$(%s)",temporary);1632 }1633 }1634 1635 if(Parameter[i2]==','){1636 if(bWrite) lstrcat(buffer,"+\",\"+");1637 else lstrcat(buffer,"+\"\t\"+");1638 }1639 else if(Parameter[i2]==';'){1640 if(Parameter[i2+1]=='\0'){1641 sw=0;1642 break;1643 }1644 if(bWrite) lstrcat(buffer,"+\",\"+");1645 else lstrcat(buffer,"+\" \"+");1646 }1647 else if(Parameter[i2]=='\0') break;1648 1649 i2++;1650 }1651 1652 if(sw) lstrcat(buffer,"+Ex\"\\r\\n\"");1653 1654 UserProc *pUserProc;1655 if(bFile) pUserProc=GetSubHash("PRINT_ToFile");1656 else pUserProc=GetSubHash("PRINT_ToPrompt");1657 if(!pUserProc){1658 SetError(3,"Print",cp);1659 return;1660 }1661 Opcode_CallProc(buffer,pUserProc,0,"",0);1662 }1663 1664 1665 1666 1347 1667 1348 //////////// 1668 1349 // ポインタ 1669 1350 1670 void OpcodeCallPtr(char *Parameter){1671 extern HANDLE hHeap;1672 int i,i2,i3,num,types[255];1673 BOOL bCdecl;1674 char szFuncPtr[VN_SIZE],temporary[VN_SIZE],*Parms[255];1675 1676 //関数ポインタを取得1677 i=GetOneParameter(Parameter,0,szFuncPtr);1678 1679 if(lstrcmpi(szFuncPtr,"cdecl")==0){1680 //cdeclが指定された場合は、第2パラメータを関数ポインタとして扱う1681 bCdecl=1;1682 1683 i=GetOneParameter(Parameter,i,szFuncPtr);1684 }1685 else bCdecl=0;1686 1687 if(Parameter[0]=='\0'){1688 SetError(10,"CallPtr",cp);1689 }1690 1691 num=0;1692 while(Parameter[i]){1693 i=GetOneParameter(Parameter,i,temporary);1694 1695 types[num]=DEF_LONG;1696 1697 for(i2=0;;i2++){1698 if(temporary[i2]=='\0') break;1699 if(temporary[i2]==1&&temporary[i2+1]==ESC_AS){1700 LONG_PTR lp;1701 types[num]=GetTypeFixed(temporary+i2+2,&lp);1702 1703 if(types[num]==DEF_OBJECT){1704 SetError(11,temporary+i2+2,cp);1705 }1706 1707 temporary[i2]=0;1708 break;1709 }1710 }1711 1712 Parms[num]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);1713 lstrcpy(Parms[num],temporary);1714 1715 num++;1716 }1717 1718 int ParmSize=0;1719 1720 for(i=num-1;i>=0;i--){1721 //スタックへプッシュ1722 i3=NumOpe(Parms[i],0,0,0);1723 1724 switch(types[i]){1725 case DEF_INT64:1726 case DEF_QWORD:1727 ChangeTypeToInt64(i3);1728 break;1729 case DEF_SINGLE:1730 ChangeTypeToSingle(i3);1731 break;1732 case DEF_DOUBLE:1733 ChangeTypeToDouble(i3);1734 break;1735 1736 default:1737 ChangeTypeToLong(i3);1738 break;1739 }1740 1741 ParmSize+=GetTypeSize(types[i],0);1742 1743 HeapDefaultFree(Parms[i]);1744 }1745 1746 i3=NumOpe(szFuncPtr,0,0,0);1747 ChangeTypeToLong(i3);1748 1749 //pop eax1750 op_pop(REG_EAX);1751 1752 //call eax1753 OpBuffer[obp++]=(char)0xFF;1754 OpBuffer[obp++]=(char)0xD0;1755 1756 if(bCdecl){1757 //スタックを戻す1758 1759 //add esp,ParmSize1760 op_add_esp(ParmSize);1761 }1762 }1763 1764 1351 void OpcodeSetPtrData(char *Parameter,int type){ 1765 int i ,i2;1352 int i; 1766 1353 char temporary[VN_SIZE]; 1767 1354 … … 1784 1371 } 1785 1372 1786 i2=NumOpe(temporary,0,0,0); 1787 ChangeTypeToLong(i2); 1373 Type resultType; 1374 if( !NumOpe(temporary,Type(),resultType) ){ 1375 return; 1376 } 1377 if(!resultType.IsWhole()){ 1378 SetError(11,Parameter,cp); 1379 return; 1380 } 1381 1382 ChangeTypeToLong( resultType.GetBasicType() ); 1788 1383 1789 1384 //第2パラメータを取得 … … 1794 1389 } 1795 1390 1796 i2=NumOpe(temporary,0,0,0); 1391 if( !NumOpe(temporary,Type(),resultType) ){ 1392 return; 1393 } 1394 1797 1395 if(type==DEF_DOUBLE){ 1798 ChangeTypeToDouble_ToFpuReg( i2);1396 ChangeTypeToDouble_ToFpuReg( resultType.GetBasicType() ); 1799 1397 1800 1398 //pop eax … … 1806 1404 } 1807 1405 else if(type==DEF_SINGLE){ 1808 ChangeTypeToSingle( i2);1406 ChangeTypeToSingle( resultType.GetBasicType() ); 1809 1407 1810 1408 //pop ebx … … 1819 1417 } 1820 1418 else if(type==DEF_QWORD){ 1821 ChangeTypeToInt64( i2);1419 ChangeTypeToInt64( resultType.GetBasicType() ); 1822 1420 1823 1421 //pop ecx … … 1840 1438 } 1841 1439 else if(type==DEF_DWORD){ 1842 ChangeTypeToLong( i2);1440 ChangeTypeToLong( resultType.GetBasicType() ); 1843 1441 1844 1442 //pop ebx … … 1853 1451 } 1854 1452 else if(type==DEF_WORD){ 1855 ChangeTypeToLong( i2);1453 ChangeTypeToLong( resultType.GetBasicType() ); 1856 1454 1857 1455 //pop ebx … … 1867 1465 } 1868 1466 else if(type==DEF_BYTE){ 1869 ChangeTypeToLong( i2);1467 ChangeTypeToLong( resultType.GetBasicType() ); 1870 1468 1871 1469 //pop ebx
Note:
See TracChangeset
for help on using the changeset viewer.