Changeset 290 in dev for trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
- Timestamp:
- Aug 21, 2007, 11:00:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
r265 r290 51 51 52 52 int BaseTypeSize; 53 BaseTypeSize= GetTypeSize(BaseType,-1);53 BaseTypeSize=Type(BaseType,-1).GetSize(); 54 54 55 55 if(IsRealNumberType(BaseType)){ 56 if( GetTypeSize(CalcType,-1)<4)56 if(Type(CalcType,-1).GetSize()<4) 57 57 type=MakeWholeType(4,IsSignedType(CalcType)); 58 58 } 59 else if(BaseTypeSize> GetTypeSize(CalcType,-1)){59 else if(BaseTypeSize>Type(CalcType,-1).GetSize()){ 60 60 //要求される型のほうがサイズが大きいとき 61 61 type=MakeWholeType(BaseTypeSize,IsSignedType(CalcType)); … … 358 358 } 359 359 360 const CClass &objClass = leftType.GetClass();361 362 360 363 361 /////////////////////////////////////////////////////////////////// 364 362 // メンバを検索 365 363 /////////////////////////////////////////////////////////////////// 366 if( GetMemberType( objClass, member, resultType, 0, false ) ){364 if( GetMemberType( leftType, member, resultType, 0, false ) ){ 367 365 // メンバが見つかったとき 368 366 return true; … … 378 376 379 377 vector<const UserProc *> userProcs; 380 objClass.GetMethods().Enum( methodName, userProcs );378 leftType.GetClass().GetMethods().Enum( methodName, userProcs ); 381 379 if(userProcs.size()){ 382 380 //オーバーロードを解決 … … 385 383 if( pUserProc ){ 386 384 resultType = pUserProc->ReturnType(); 385 386 ///////////////////////////////////////////////////////// 387 // ☆★☆ ジェネリクスサポート ☆★☆ 388 389 if( resultType.IsTypeParameter() ) 390 { 391 // 型パラメータだったとき 392 if( leftType.HasActualGenericType() ) 393 { 394 // TODO: GetDummyActualGenericTypeを適切な形に実装し直す 395 resultType = leftType.GetDummyActualGenericType(); 396 } 397 else 398 { 399 // TODO: ベースオブジェクト(指定されていないときはObjectクラス)にセットする 400 resultType.SetBasicType( DEF_OBJECT ); 401 } 402 } 403 404 // 405 ///////////////////////////////////////////////////////// 406 387 407 return true; 388 408 }
Note:
See TracChangeset
for help on using the changeset viewer.