Changeset 64 in dev for BasicCompiler_Common/Subroutine.cpp
- Timestamp:
- Mar 8, 2007, 2:49:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Subroutine.cpp
r54 r64 460 460 _int64 i64data; 461 461 type = StaticCalculation( true, temporary, 0, &i64data, &lpIndex ); 462 if( type != DEF_PTR_ BYTE){462 if( type != DEF_PTR_CHAR ){ 463 463 SetError(1,NULL,NowLine); 464 464 return; … … 483 483 if( temporary[0] ){ 484 484 type = StaticCalculation( true, temporary, 0, &i64data, &lpIndex ); 485 if( type != DEF_PTR_ BYTE){485 if( type != DEF_PTR_CHAR ){ 486 486 SetError(1,NULL,NowLine); 487 487 return; … … 604 604 i+=2; 605 605 pdi->ReturnType=GetTypeFixed(buffer+i,&pdi->u.ReturnIndex); 606 if(pdi->ReturnType== -1) SetError(3,buffer+i,NowLine);606 if(pdi->ReturnType==DEF_NON) SetError(3,buffer+i,NowLine); 607 607 if(pdi->ReturnType==DEF_OBJECT) SetError(40,NULL,NowLine); 608 608 } 609 609 else if(buffer[i]) SetError(1,NULL,NowLine); 610 else pdi->ReturnType= -1;610 else pdi->ReturnType=DEF_NON; 611 611 612 612 pdi->pos=NowLine; … … 635 635 } 636 636 else{ 637 if(NATURAL_TYPE(ppi1[i].type)==DEF_OBJECT){ 637 if(NATURAL_TYPE(ppi1[i].type)==DEF_OBJECT 638 || NATURAL_TYPE(ppi1[i].type)==DEF_STRUCT ){ 638 639 if(ppi1[i].u.index!=ppi2[i].u.index) return 1; 639 640 } … … 827 828 } 828 829 psi->ReturnType=GetTypeFixed(temporary,&psi->u.ReturnIndex); 829 if(psi->ReturnType== -1) SetError(3,temporary,NowLine);830 if(psi->ReturnType==DEF_NON) SetError(3,temporary,NowLine); 830 831 831 832 sw_as=1; … … 842 843 else{ 843 844 //戻り値なしのSub定義 844 psi->ReturnType= -1;845 psi->ReturnType=DEF_NON; 845 846 psi->u.ReturnIndex=-1; 846 847 } … … 1129 1130 } 1130 1131 1131 //リアルパラメータ領域を取得(_System_LocalThis 、_System_ReturnValueを考慮して2つだけ多く確保する)1132 //リアルパラメータ領域を取得(_System_LocalThisを考慮して2つだけ多く確保する) 1132 1133 psi->pRealParmInfo=(PARAMETER_INFO *)HeapAlloc(hHeap,0,(psi->ParmNum+2)*sizeof(PARAMETER_INFO)); 1133 1134 psi->RealParmNum=0; … … 1147 1148 } 1148 1149 1149 if(psi->ReturnType==DEF_ OBJECT && psi->isReturnRef == false){1150 if(psi->ReturnType==DEF_STRUCT){ 1150 1151 i = psi->RealParmNum; 1151 1152 1152 // 実体オブジェクトを戻り値として持つ場合1153 //構造体を戻り値として持つ場合 1153 1154 //※第一パラメータ(Thisポインタありの場合は第二パラメータ)を戻り値用の参照宣言にする 1154 1155 … … 1156 1157 psi->pRealParmInfo[i].name="_System_ReturnValue"; 1157 1158 else psi->pRealParmInfo[i].name=psi->name; 1158 psi->pRealParmInfo[i].type=DEF_ OBJECT;1159 psi->pRealParmInfo[i].type=DEF_STRUCT; 1159 1160 psi->pRealParmInfo[i].u.index=psi->u.ReturnIndex; 1160 1161 psi->pRealParmInfo[i].bByVal=0; … … 1521 1522 } 1522 1523 pi->ReturnType=GetTypeFixed(temporary,&pi->u.ReturnIndex); 1523 if(pi->ReturnType==-1) SetError(3,temporary,cp); 1524 if(pi->ReturnType==DEF_OBJECT) SetError(40,NULL,cp); 1524 if(pi->ReturnType==DEF_NON) SetError(3,temporary,cp); 1525 1525 } 1526 1526 else pi->ReturnType=DEF_DOUBLE; 1527 1527 } 1528 else pi->ReturnType= -1;1528 else pi->ReturnType=DEF_NON; 1529 1529 1530 1530 return ProcPtrInfoNum-1;
Note:
See TracChangeset
for help on using the changeset viewer.