Changeset 50 in dev for BasicCompiler64/OperatorProc.cpp
- Timestamp:
- Feb 10, 2007, 5:44:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/OperatorProc.cpp
r38 r50 31 31 pobj_c=(CClass *)index_stack[sp-2]; 32 32 33 SUBINFO **ppsi; 34 int num; 35 ppsi=pobj_c->GetOperatorSubInfo(idCalc,num); 36 if(num==0){ 37 HeapDefaultFree(ppsi); 38 33 std::vector<SUBINFO *> subs; 34 pobj_c->EnumMethod( idCalc, subs ); 35 if( subs.size() == 0 ){ 39 36 return 0; 40 37 } … … 48 45 int i; 49 46 BOOL bReturnTypeIsObject=1; 50 TYPEINFO ReturnType={DEF_OBJECT, ppsi[0]->u.ReturnIndex};51 for(i=0;i< num;i++){52 if( ppsi[i]->ReturnType!=DEF_OBJECT)47 TYPEINFO ReturnType={DEF_OBJECT,subs[0]->u.ReturnIndex}; 48 for(i=0;i<subs.size();i++){ 49 if(subs[i]->ReturnType!=DEF_OBJECT) 53 50 bReturnTypeIsObject=0; 54 51 } … … 88 85 else GetCalcName(idCalc,temporary); 89 86 SUBINFO *psi; 90 psi=OverloadSolution(temporary, ppsi,num,ppi,iParmNum,pBaseTypeInfo);91 HeapDefaultFree(ppsi); 87 psi=OverloadSolution(temporary,subs,ppi,iParmNum,pBaseTypeInfo); 88 92 89 93 90 if(!psi){ … … 438 435 //インデクサ(getter)を呼び出す 439 436 void CallIndexerGetterProc(int reg,CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo){ 440 SUBINFO **ppsi; 441 int num; 442 ppsi=pobj_Class->GetOperatorSubInfo(CALC_ARRAY_GET,num); 443 if(num==0){ 444 HeapDefaultFree(ppsi); 445 437 438 std::vector<SUBINFO *> subs; 439 pobj_Class->EnumMethod( CALC_ARRAY_GET, subs ); 440 if( subs.size() == 0 ){ 446 441 return; 447 442 } … … 452 447 ////////////////////////////////////////////////////// 453 448 454 Opcode_CallProc(Parameter, ppsi[0],0,ObjectName,DEF_OBJECT);455 RetTypeInfo.type = ppsi[0]->ReturnType;456 RetTypeInfo.u.lpIndex = ppsi[0]->u.ReturnIndex;449 Opcode_CallProc(Parameter,subs[0],0,ObjectName,DEF_OBJECT); 450 RetTypeInfo.type = subs[0]->ReturnType; 451 RetTypeInfo.u.lpIndex = subs[0]->u.ReturnIndex; 457 452 458 453 //mov reg,rax … … 464 459 }//////////////////////////////////////////// 465 460 466 HeapDefaultFree(ppsi);467 461 }
Note:
See TracChangeset
for help on using the changeset viewer.