Changeset 78 in dev for BasicCompiler_Common/ParamImpl.cpp
- Timestamp:
- Mar 25, 2007, 2:47:49 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/ParamImpl.cpp
r77 r78 6 6 #include "../BasicCompiler32/opcode.h" 7 7 #endif 8 9 #define OVERLOAD_MIN_LEVEL 0 10 #define OVERLOAD_MAX_LEVEL 4 11 #define OVERLOAD_LEVEL0 0 // 型調整なし。厳密に等しい 12 #define OVERLOAD_LEVEL1 1 // 型調整なし。整数型/実数型レベルでの同一性チェック 13 #define OVERLOAD_LEVEL2 2 // 型調整あり。厳密に等しい 14 #define OVERLOAD_LEVEL3 3 // 型調整あり。整数型/実数型レベルでの同一性チェック 15 #define OVERLOAD_LEVEL4 4 // 型調整あり。数値型/クラス型レベルでの同一性チェック 8 16 9 17 ParamImpl::ParamImpl(const char *buffer): … … 119 127 120 128 NumOpe_GetType(Parms[i], 121 (level==OVERLOAD_LEVEL0 )? nullParam : param,129 (level==OVERLOAD_LEVEL0 || level == OVERLOAD_LEVEL1)? nullParam : param, 122 130 argType); 123 131 } … … 127 135 128 136 if(argType.GetBasicType()!=param.GetBasicType()){ 129 if( level==OVERLOAD_LEVEL1 || level == OVERLOAD_LEVEL0){137 if( level == OVERLOAD_LEVEL0 || level==OVERLOAD_LEVEL2 ){ 130 138 return false; 131 139 } 132 else if( level==OVERLOAD_LEVEL2){140 else if( level == OVERLOAD_LEVEL1 || level==OVERLOAD_LEVEL3){ 133 141 if(!( 134 IsWholeNumberType(argType.GetBasicType())&&IsWholeNumberType(param.GetBasicType())||135 IsRealNumberType(argType.GetBasicType())&&IsRealNumberType(param.GetBasicType())142 argType.IsWhole()&¶m.IsWhole()|| 143 argType.IsReal()&¶m.IsReal() 136 144 )){ 137 145 return false; 138 146 } 139 147 } 140 else if(level==OVERLOAD_LEVEL 3){141 if(argType. GetBasicType()==DEF_OBJECT||param.GetBasicType()==DEF_OBJECT) return false;148 else if(level==OVERLOAD_LEVEL4){ 149 if(argType.IsObject()||param.IsObject()) return false; 142 150 } 143 151 }
Note:
See TracChangeset
for help on using the changeset viewer.