Changeset 38 in dev
- Timestamp:
- Jan 22, 2007, 11:38:19 PM (18 years ago)
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/NumOpe.cpp
r36 r38 361 361 if(i2==DEF_OBJECT){ 362 362 TYPEINFO RetTypeInfo; 363 Call ArrayOperatorProc(pobj_c,variable,array_element,RetTypeInfo);363 CallIndexerGetterProc(pobj_c,variable,array_element,RetTypeInfo); 364 364 type[sp]=RetTypeInfo.type; 365 365 index_stack[sp]=RetTypeInfo.u.lpIndex; -
BasicCompiler32/Opcode.h
r36 r38 241 241 int CallOperatorProc(int idCalc,TYPEINFO *pBaseTypeInfo,int *type,LONG_PTR *index_stack,BOOL *bUseHeap,int &sp); 242 242 void CallCastOperatorProc(int &CalcType,LONG_PTR &lpCalcIndex,BOOL bCalcUseHeap,int ToType,LONG_PTR lpToIndex); 243 void Call ArrayOperatorProc(CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo);243 void CallIndexerGetterProc(CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo); 244 244 245 245 //Compile_Statement.cpp -
BasicCompiler32/OperatorProc.cpp
r31 r38 262 262 SetError(-1,"キャスト演算子がオーバーロードされていません。",cp); 263 263 } 264 void Call ArrayOperatorProc(CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo){264 void CallIndexerGetterProc(CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo){ 265 265 SUBINFO **ppsi; 266 266 int num; -
BasicCompiler64/NumOpe.cpp
r35 r38 404 404 405 405 406 //インデクサ(getアクセサ) 406 407 char variable[VN_SIZE],array_element[VN_SIZE]; 407 408 CClass *pobj_c; … … 411 412 if(i2==DEF_OBJECT){ 412 413 TYPEINFO RetTypeInfo; 413 Call ArrayOperatorProc(UseReg,pobj_c,variable,array_element,RetTypeInfo);414 CallIndexerGetterProc(UseReg,pobj_c,variable,array_element,RetTypeInfo); 414 415 type[sp]=RetTypeInfo.type; 415 416 index_stack[sp]=RetTypeInfo.u.lpIndex; -
BasicCompiler64/Opcode.h
r36 r38 394 394 int CallOperatorProc(int idCalc,TYPEINFO *pBaseTypeInfo,int *type,LONG_PTR *index_stack,BOOL *bUseHeap,int &sp); 395 395 void CallCastOperatorProc(int reg,int &CalcType,LONG_PTR &lpCalcIndex,BOOL bCalcUseHeap,int ToType,LONG_PTR lpToIndex); 396 void Call ArrayOperatorProc(int reg,CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo);396 void CallIndexerGetterProc(int reg,CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo); 397 397 398 398 //Compile_Statement.cpp -
BasicCompiler64/OperatorProc.cpp
r31 r38 436 436 } 437 437 438 void CallArrayOperatorProc(int reg,CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo){ 438 //インデクサ(getter)を呼び出す 439 void CallIndexerGetterProc(int reg,CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo){ 439 440 SUBINFO **ppsi; 440 441 int num; -
BasicCompiler_Common/NumOpe_GetType.cpp
r35 r38 409 409 } 410 410 411 412 //インデクサ(getアクセサ) 413 char VarName[VN_SIZE],ArrayElements[VN_SIZE]; 414 GetArrayElement(values[i],VarName,ArrayElements); 415 if(ArrayElements[0]){ 416 CClass *pobj_c; 417 i2=GetVarType(VarName,(LONG_PTR *)&pobj_c,0); 418 if(i2==DEF_OBJECT){ 419 TYPEINFO RetTypeInfo; 420 if( !GetReturnTypeOfIndexerGetterProc(pobj_c,RetTypeInfo) ){ 421 SetError(1,NULL,cp); 422 goto error; 423 } 424 type[sp]=RetTypeInfo.type; 425 index_stack[sp]=RetTypeInfo.u.lpIndex; 426 bLiteralCalculation=0; 427 428 sp++; 429 break; 430 } 431 } 432 433 411 434 i2=GetVarType(values[i],&index_stack[sp],0); 412 435 if(i2!=-1){ … … 472 495 473 496 //配列要素を排除 474 char VarName[VN_SIZE],ArrayElements[VN_SIZE];475 497 GetArrayElement(values[i],VarName,ArrayElements); 476 498 -
BasicCompiler_Common/Subroutine.cpp
r31 r38 222 222 return 1; 223 223 } 224 225 //インデクサ(getter)の戻り値を取得 226 bool GetReturnTypeOfIndexerGetterProc(CClass *pobj_Class,TYPEINFO &RetTypeInfo){ 227 SUBINFO **ppsi; 228 int num; 229 ppsi=pobj_Class->GetOperatorSubInfo(CALC_ARRAY_GET,num); 230 if(num==0){ 231 HeapDefaultFree(ppsi); 232 233 return false; 234 } 235 236 RetTypeInfo.type = ppsi[0]->ReturnType; 237 RetTypeInfo.u.lpIndex = ppsi[0]->u.ReturnIndex; 238 239 HeapDefaultFree(ppsi); 240 241 return true; 242 } 243 224 244 225 245 void AddDeclareData(char *buffer,int NowLine){ -
BasicCompiler_Common/common.h
r34 r38 550 550 int GetReturnTypeOfProc(int idProc,void *pInfo,char *name,char *Parameter,LONG_PTR *plpRetIndex); 551 551 BOOL GetReturnTypeOfPropertyMethod(char *variable,char *RightSide,TYPEINFO *pRetTypeInfo); 552 bool GetReturnTypeOfIndexerGetterProc(CClass *pobj_Class,TYPEINFO &RetTypeInfo); 552 553 BOOL CompareParameter(PARAMETER_INFO *ppi1,int pi_num1,PARAMETER_INFO *ppi2,int pi_num2); 553 554 SUBINFO *AddSubData(char *buffer,int NowLine,BOOL bVirtual,CClass *pobj_c,BOOL bStatic=0);
Note:
See TracChangeset
for help on using the changeset viewer.