Changeset 36 in dev for BasicCompiler_Common/Overload.cpp
- Timestamp:
- Jan 20, 2007, 4:55:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Overload.cpp
r31 r36 46 46 } 47 47 48 BOOL OverloadCheck(PARAMETER_INFO *ppi1,int ParmNum1,PARAMETER_INFO *ppi2,int ParmNum2){49 //パラメータの個数が不一致の場合50 if(ParmNum1!=ParmNum2) return 0;51 52 int i;53 for(i=0;i<ParmNum1;i++){54 if(ppi1[i].type!=ppi2[i].type) return 0;55 else{56 if(NATURAL_TYPE(ppi1[i].type)==DEF_OBJECT){57 if(ppi1[i].u.index!=ppi2[i].u.index) return 0;58 }59 }60 }61 62 return 1;63 }64 BOOL OverloadCheckLevel2(PARAMETER_INFO *ppi1,int ParmNum1,PARAMETER_INFO *ppi2,int ParmNum2){65 //パラメータの個数が不一致の場合66 if(ParmNum1!=ParmNum2) return 0;67 68 int i;69 for(i=0;i<ParmNum1;i++){70 if(ppi1[i].type!=ppi2[i].type){71 if(!(72 IsNaturalWholeNumberType(ppi1[i].type)&&IsNaturalWholeNumberType(ppi2[i].type)||73 IsRealNumberType(ppi1[i].type)&&IsRealNumberType(ppi2[i].type)74 )) return 0;75 }76 else{77 if(NATURAL_TYPE(ppi1[i].type)==DEF_OBJECT){78 if(ppi1[i].u.index!=ppi2[i].u.index) return 0;79 }80 }81 }82 83 return 1;84 }85 48 SUBINFO *OverloadSolution(char *name,SUBINFO **ppsi,int num,PARAMETER_INFO *ppi,int ParmNum,TYPEINFO *pReturnTypeInfo){ 86 49 // オーバーロードの解決
Note:
See TracChangeset
for help on using the changeset viewer.