Changeset 50 in dev for BasicCompiler32/OperatorProc.cpp
- Timestamp:
- Feb 10, 2007, 5:44:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/OperatorProc.cpp
r38 r50 26 26 pobj_c=(CClass *)index_stack[sp-2]; 27 27 28 SUBINFO **ppsi; 29 int num; 30 ppsi=pobj_c->GetOperatorSubInfo(idCalc,num); 31 if(num==0){ 32 HeapDefaultFree(ppsi); 33 28 std::vector<SUBINFO *> subs; 29 pobj_c->EnumMethod( idCalc, subs ); 30 if( subs.size() == 0 ){ 34 31 return 0; 35 32 } … … 43 40 int i; 44 41 BOOL bReturnTypeIsObject=1; 45 TYPEINFO ReturnType={DEF_OBJECT, ppsi[0]->u.ReturnIndex};46 for (i=0;i<num;i++){47 if(p psi[i]->ReturnType!=DEF_OBJECT)42 TYPEINFO ReturnType={DEF_OBJECT,subs[0]->u.ReturnIndex}; 43 foreach( SUBINFO *psi, subs ){ 44 if(psi->ReturnType!=DEF_OBJECT) 48 45 bReturnTypeIsObject=0; 49 46 } … … 83 80 else GetCalcName(idCalc,temporary); 84 81 SUBINFO *psi; 85 psi=OverloadSolution(temporary,ppsi,num,ppi,iParmNum,pBaseTypeInfo); 86 HeapDefaultFree(ppsi); 82 psi=OverloadSolution(temporary,subs,ppi,iParmNum,pBaseTypeInfo); 87 83 88 84 if(!psi){ … … 263 259 } 264 260 void CallIndexerGetterProc(CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo){ 265 SUBINFO **ppsi; 266 int num; 267 ppsi=pobj_Class->GetOperatorSubInfo(CALC_ARRAY_GET,num); 268 if(num==0){ 269 HeapDefaultFree(ppsi); 270 261 std::vector<SUBINFO *> subs; 262 pobj_Class->EnumMethod( CALC_ARRAY_GET, subs ); 263 if( subs.size() == 0 ){ 271 264 return; 272 265 } 273 266 274 Opcode_CallProc(Parameter,ppsi[0],0,ObjectName,DEF_OBJECT); 275 RetTypeInfo.type=ppsi[0]->ReturnType; 276 RetTypeInfo.u.lpIndex = ppsi[0]->u.ReturnIndex; 277 278 HeapDefaultFree(ppsi); 279 } 267 Opcode_CallProc(Parameter,subs[0],0,ObjectName,DEF_OBJECT); 268 RetTypeInfo.type = subs[0]->ReturnType; 269 RetTypeInfo.u.lpIndex = subs[0]->u.ReturnIndex; 270 }
Note:
See TracChangeset
for help on using the changeset viewer.