Changeset 36 in dev for BasicCompiler_Common
- Timestamp:
- Jan 20, 2007, 4:55:26 AM (18 years ago)
- Location:
- BasicCompiler_Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/BasicFixed.h
r26 r36 32 32 #define DEF_DOUBLE 0x0000000A 33 33 34 //bool型 35 #define DEF_BOOLEAN 0x0000000B 36 34 37 //文字列型 35 #define DEF_STRING 0x0000000 B38 #define DEF_STRING 0x0000000C 36 39 37 40 //ポインタ型 38 #define DEF_PTR_VOID 0x0000000 C39 #define DEF_PTR_PROC 0x0000000 D41 #define DEF_PTR_VOID 0x0000000D 42 #define DEF_PTR_PROC 0x0000000E 40 43 41 44 //特殊型 -
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 // オーバーロードの解決 -
BasicCompiler_Common/Variable.cpp
r34 r36 56 56 } 57 57 BOOL IsWholeNumberType(int type){ 58 return (IsNaturalWholeNumberType(type)||IsPtrType(type)); 58 return ( 59 IsNaturalWholeNumberType(type) 60 || IsPtrType(type) 61 || type == DEF_BOOLEAN 62 ); 59 63 } 60 64 BOOL IsRealNumberType(int type){ … … 132 136 else if(type==DEF_INTEGER||type==DEF_WORD) 133 137 return sizeof(WORD); 134 else if(type==DEF_CHAR||type==DEF_BYTE )138 else if(type==DEF_CHAR||type==DEF_BYTE || type == DEF_BOOLEAN) 135 139 return sizeof(BYTE); 136 140 … … 187 191 else if(lstrcmpi(TypeName,"Double")==0) return DEF_DOUBLE; 188 192 193 //bool型 194 else if( lstrcmpi( TypeName, "Boolean" ) == 0 ) return DEF_BOOLEAN; 195 189 196 //ポインタ型 190 197 //※VoidPtr型以外のポインタ型はTypeDef宣言により定義される … … 253 260 else if(type==DEF_SINGLE) lstrcpy(name,"Single"); 254 261 else if(type==DEF_DOUBLE) lstrcpy(name,"Double"); 262 263 //bool型 264 else if(type==DEF_BOOLEAN) lstrcpy(name,"Boolean"); 255 265 256 266 //オブジェクト -
BasicCompiler_Common/calculation.cpp
r15 r36 628 628 } 629 629 } 630 else if(i2==DEF_BOOLEAN){ 631 BYTE byteData; 632 if(i3=ReadProcessMemory(hDebugProcess,offset,&byteData,sizeof(BYTE),&stAccBytes)){ 633 i64nums[pnum]=(_int64)byteData; 634 } 635 } 630 636 else return 0; 631 637
Note:
See TracChangeset
for help on using the changeset viewer.