Changeset 417 in dev for trunk/abdev/BasicCompiler64/NumOpe.cpp
- Timestamp:
- Mar 7, 2008, 5:32:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler64/NumOpe.cpp
r416 r417 638 638 bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool *pIsClassName, bool isProcedureCallOnly, bool isWriteAccess ) 639 639 { 640 bool isInitRegSwitch = false; 641 if( !pobj_reg ) 642 { 643 isInitRegSwitch = true; 644 645 //作業用レジスタを取得 646 pobj_reg = new CRegister( REG_RAX ); 647 } 648 649 //エラー時の復旧用 650 CRegister objReg_Backup = *pobj_reg; 651 652 640 653 RELATIVE_VAR relativeVar; 641 654 bool isVariable = false; … … 650 663 } 651 664 665 666 if( !result ) 667 { 668 *pobj_reg = objReg_Backup; 669 } 670 671 if( isInitRegSwitch ){ 672 //整合性をチェック(バグ回避) 673 if( result ) 674 { 675 pobj_reg->bug_check(); 676 } 677 678 //作業レジスタを解放 679 delete pobj_reg; 680 pobj_reg = NULL; 681 } 682 652 683 return result; 653 684 } 654 685 bool TermOpeOnlyVariable( const char *term, Type &resultType, RELATIVE_VAR &relativeVar, bool isWriteAccess ) 655 686 { 687 if( pobj_reg ) 688 { 689 SetError(); 690 } 691 692 //作業用レジスタを取得 693 pobj_reg = new CRegister( REG_NON ); 694 656 695 bool isLiteral, isVariable = false; 657 696 bool result = _TermOpe( term, Type(), resultType, isLiteral, NULL, NULL, false, isVariable, relativeVar, isWriteAccess ); … … 661 700 SetError(); 662 701 } 702 703 //整合性をチェック(バグ回避) 704 if( result ) 705 { 706 pobj_reg->bug_check(); 707 } 708 709 //作業レジスタを解放 710 delete pobj_reg; 711 pobj_reg=0; 663 712 664 713 return result; … … 1327 1376 BOOL *pbUseHeap ) 1328 1377 { 1329 BOOL bInitRegSwitch=0; 1330 if(!pobj_reg){ 1331 bInitRegSwitch=1; 1378 bool isInitRegSwitch = false; 1379 if( !pobj_reg ) 1380 { 1381 isInitRegSwitch = true; 1332 1382 1333 1383 //作業用レジスタを取得 1334 pobj_reg =new CRegister(*pReg);1384 pobj_reg = new CRegister( *pReg ); 1335 1385 } 1336 1386 1337 1387 //エラー時の復旧用 1338 CRegister objReg_Backup; 1339 objReg_Backup=*pobj_reg; 1388 CRegister objReg_Backup = *pobj_reg; 1340 1389 1341 1390 *pReg = pobj_reg->GetNextReg(); … … 1347 1396 if( !result ) 1348 1397 { 1349 *pobj_reg =objReg_Backup;1350 } 1351 1352 if( bInitRegSwitch){1398 *pobj_reg = objReg_Backup; 1399 } 1400 1401 if( isInitRegSwitch ){ 1353 1402 //整合性をチェック(バグ回避) 1354 1403 if( result ) … … 1359 1408 //作業レジスタを解放 1360 1409 delete pobj_reg; 1361 pobj_reg =0;1410 pobj_reg = NULL; 1362 1411 } 1363 1412
Note:
See TracChangeset
for help on using the changeset viewer.