Changeset 28 in dev
- Timestamp:
- Jan 8, 2007, 6:34:44 AM (18 years ago)
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/BasicCompiler.vcproj
r26 r28 154 154 ObjectFile=".\Release/" 155 155 ProgramDataBaseFileName=".\Release/" 156 BrowseInformation=" 2"156 BrowseInformation="0" 157 157 BrowseInformationFile=".\Release/" 158 158 WarningLevel="3" -
BasicCompiler32/CParameter.cpp
r20 r28 215 215 SUBINFO *psi; 216 216 psi=0; 217 if(lstrcmp(name,"Abs")==0){ 218 MessageBeep(0); 219 } 217 220 for(i=0;i<num;i++){ 218 221 psi=ppsi[i]; … … 550 553 } 551 554 555 //戻り値用の変数名を取得 556 char *lpszVarNameToReturn; 557 if(FuncName[0]==1&&FuncName[1]==ESC_OPERATOR) lpszVarNameToReturn="_System_ReturnValue"; 558 else lpszVarNameToReturn=FuncName; 559 552 560 //パラメータをレジスタとスタックに格納 553 561 int CalcType; … … 567 575 } 568 576 if((i2==0||i2==1)&&ppi[i2].name){ 569 if(lstrcmp(ppi[i2].name, FuncName)==0){577 if(lstrcmp(ppi[i2].name,lpszVarNameToReturn)==0){ 570 578 //オブジェクトメンバの第一または第二パラメータの戻り値用オブジェクト 571 579 continue; -
BasicCompiler32/Compile_Calc.cpp
r11 r28 484 484 } 485 485 486 487 488 486 //////////////////////////////////////// 489 487 // 変数のタイプ型を識別して、演算を行う -
BasicCompiler32/Compile_CallProc.cpp
r27 r28 48 48 char ObjectName[VN_SIZE]; 49 49 int RefType; 50 GetObjectName(name,ObjectName,&RefType);50 SplitObjectName(name,ObjectName,&RefType); 51 51 52 52 … … 112 112 char ObjectName[VN_SIZE]; 113 113 int RefType; 114 GetObjectName(VarName,ObjectName,&RefType);114 SplitObjectName(VarName,ObjectName,&RefType); 115 115 116 116 //オーバーロード用の関数リストを作成 -
BasicCompiler32/Compile_Func.cpp
r11 r28 288 288 char ObjectName[VN_SIZE]; 289 289 int RefType; 290 GetObjectName(name,ObjectName,&RefType);290 SplitObjectName(name,ObjectName,&RefType); 291 291 292 292 if(ObjectName[0]){ -
BasicCompiler32/Compile_Object.cpp
r3 r28 131 131 pobj_c=(CClass *)*plpIndex; 132 132 133 if(pobj_c->Is HoldAbstractFunction()){133 if(pobj_c->IsAbstract()){ 134 134 //抽象クラスだったとき 135 135 SetError(125,pobj_c->name,cp); -
BasicCompiler32/Compile_ProcOp.cpp
r27 r28 554 554 //仮想関数テーブルを初期化 555 555 if(pobj_CompilingClass->vtbl_num&& 556 pobj_CompilingClass->Is HoldAbstractFunction()==0){557 //関数テーブルに値をセット558 offset=pobj_CompilingClass->GetVtblGlobalOffset();559 560 //mov eax,offset561 OpBuffer[obp++]=(char)0xB8;562 *((long *)(OpBuffer+obp))=offset;563 pobj_DataTableSchedule->add();564 obp+=sizeof(long);565 566 //Thisポインタをecxにコピー567 SetThisPtrToReg(REG_ECX);568 569 //mov dword ptr[ecx],eax570 OpBuffer[obp++]=(char)0x89;571 OpBuffer[obp++]=(char)0x01;556 pobj_CompilingClass->IsAbstract()==false){ 557 //関数テーブルに値をセット 558 offset=pobj_CompilingClass->GetVtblGlobalOffset(); 559 560 //mov eax,offset 561 OpBuffer[obp++]=(char)0xB8; 562 *((long *)(OpBuffer+obp))=offset; 563 pobj_DataTableSchedule->add(); 564 obp+=sizeof(long); 565 566 //Thisポインタをecxにコピー 567 SetThisPtrToReg(REG_ECX); 568 569 //mov dword ptr[ecx],eax 570 OpBuffer[obp++]=(char)0x89; 571 OpBuffer[obp++]=(char)0x01; 572 572 } 573 573 } -
BasicCompiler32/Compile_Set_Var.cpp
r3 r28 34 34 } 35 35 36 if(CalcType==DEF_OBJECT&&lpVarIndex==lpCalcIndex){ 37 //双方のオブジェクト型が完全に一致したとき 38 //※コピーを行う 39 40 int object_size; 41 object_size=GetSizeOfClass((CClass *)lpVarIndex); 42 43 //mov ecx,object_size 44 op_mov_RV(REG_ECX,object_size); 45 46 //pop esi 47 op_pop(REG_ESI); 48 49 //pop edi 50 op_pop(REG_EDI); 51 52 if(bUseHeap){ 53 //mov eax,esi 54 op_mov_RR(REG_EAX,REG_ESI); 55 } 56 57 //rep movs byte ptr[edi],byte ptr[esi] 58 op_rep_movs(sizeof(BYTE)); 59 60 if(bUseHeap){ 61 //push eax 62 op_push(REG_EAX); 63 64 //call free 65 extern SUBINFO *pSub_free; 66 op_call(pSub_free); 67 } 68 69 return; 70 } 71 else{ 72 SetError(1,NULL,cp); 73 } 36 37 if( CalcType == DEF_OBJECT ){ 38 CClass *pVarClass = (CClass *)lpVarIndex; 39 CClass *pCalcClass = (CClass *)lpCalcIndex; 40 41 42 if( pVarClass->IsEquals( pCalcClass ) //等しい 43 || pVarClass->IsSubClass( pCalcClass ) ){ //派生・継承関係 44 45 //双方のオブジェクト型が一致、または派生・継承関係にあるとき 46 //※コピーを行う 47 48 int object_size; 49 object_size=GetSizeOfClass((CClass *)lpVarIndex); 50 51 //mov ecx,object_size 52 op_mov_RV(REG_ECX,object_size); 53 54 //pop esi 55 op_pop(REG_ESI); 56 57 //pop edi 58 op_pop(REG_EDI); 59 60 if(bUseHeap){ 61 //mov eax,esi 62 op_mov_RR(REG_EAX,REG_ESI); 63 } 64 65 //rep movs byte ptr[edi],byte ptr[esi] 66 op_rep_movs(sizeof(BYTE)); 67 68 if(bUseHeap){ 69 //push eax 70 op_push(REG_EAX); 71 72 //call free 73 extern SUBINFO *pSub_free; 74 op_call(pSub_free); 75 } 76 77 return; 78 } 79 } 80 81 SetError(1,NULL,cp); 74 82 } 75 83 -
BasicCompiler32/Compile_Var.cpp
r27 r28 1254 1254 1255 1255 if(TypeInfo.type==DEF_OBJECT){ 1256 if(TypeInfo.u.pobj_Class->Is HoldAbstractFunction()){1256 if(TypeInfo.u.pobj_Class->IsAbstract()){ 1257 1257 //抽象クラスだったとき 1258 1258 SetError(125,TypeInfo.u.pobj_Class->name,cp); -
BasicCompiler64/CParameter.cpp
r20 r28 546 546 } 547 547 548 //戻り値用の変数名を取得 549 char *lpszVarNameToReturn; 550 if(FuncName[0]==1&&FuncName[1]==ESC_OPERATOR) lpszVarNameToReturn="_System_ReturnValue"; 551 else lpszVarNameToReturn=FuncName; 552 548 553 //パラメータをレジスタとスタックに格納 549 554 int CalcType; … … 563 568 } 564 569 if((i2==0||i2==1)&&ppi[i2].name){ 565 if(lstrcmp(ppi[i2].name, FuncName)==0){570 if(lstrcmp(ppi[i2].name,lpszVarNameToReturn)==0){ 566 571 //オブジェクトメンバの第一または第二パラメータの戻り値用オブジェクト 567 572 continue; -
BasicCompiler64/Compile_CallProc.cpp
r27 r28 49 49 char ObjectName[VN_SIZE]; 50 50 int RefType; 51 GetObjectName(name,ObjectName,&RefType);51 SplitObjectName(name,ObjectName,&RefType); 52 52 53 53 … … 113 113 char ObjectName[VN_SIZE]; 114 114 int RefType; 115 GetObjectName(VarName,ObjectName,&RefType);115 SplitObjectName(VarName,ObjectName,&RefType); 116 116 117 117 //オーバーロード用の関数リストを作成 -
BasicCompiler64/Compile_Func.cpp
r11 r28 140 140 char ObjectName[VN_SIZE]; 141 141 int RefType; 142 GetObjectName(name,ObjectName,&RefType);142 SplitObjectName(name,ObjectName,&RefType); 143 143 144 144 if(ObjectName[0]){ -
BasicCompiler64/Compile_Object.cpp
r15 r28 131 131 pobj_c=(CClass *)*plpIndex; 132 132 133 if(pobj_c->Is HoldAbstractFunction()){133 if(pobj_c->IsAbstract()){ 134 134 //抽象クラスだったとき 135 135 SetError(125,pobj_c->name,cp); -
BasicCompiler64/Compile_ProcOp.cpp
r27 r28 600 600 //仮想関数テーブルを初期化 601 601 if(pobj_CompilingClass->vtbl_num&& 602 pobj_CompilingClass->Is HoldAbstractFunction()==0){603 //関数テーブルに値をセット604 offset=(int)pobj_CompilingClass->GetVtblGlobalOffset();605 606 //mov rax,offset607 op_mov_RV(sizeof(_int64),REG_RAX,offset);608 obp-=sizeof(long);609 pobj_DataTableSchedule->add();610 obp+=sizeof(long);611 612 //Thisポインタをrcxにコピー613 SetThisPtrToReg(REG_RCX);614 615 //mov qword ptr[rcx],rax616 op_mov_MR(sizeof(_int64),REG_RAX,REG_RCX,0,MOD_BASE);602 pobj_CompilingClass->IsAbstract()==false){ 603 //関数テーブルに値をセット 604 offset=(int)pobj_CompilingClass->GetVtblGlobalOffset(); 605 606 //mov rax,offset 607 op_mov_RV(sizeof(_int64),REG_RAX,offset); 608 obp-=sizeof(long); 609 pobj_DataTableSchedule->add(); 610 obp+=sizeof(long); 611 612 //Thisポインタをrcxにコピー 613 SetThisPtrToReg(REG_RCX); 614 615 //mov qword ptr[rcx],rax 616 op_mov_MR(sizeof(_int64),REG_RAX,REG_RCX,0,MOD_BASE); 617 617 } 618 618 } -
BasicCompiler64/Compile_Set_Var.cpp
r27 r28 77 77 78 78 79 //TODO: 継承・派生関係にある場合は許容する 80 if(CalcType==DEF_OBJECT&&lpVarIndex==lpCalcIndex){ 81 //双方のオブジェクト型が完全に一致したとき 82 //※コピーを行う 83 84 //mov rsi,RightTermReg 85 op_mov_RR(REG_RSI,RightTermReg); 86 87 //mov rdi,VarReg 88 op_mov_RR(REG_RDI,VarReg); 89 90 int object_size; 91 object_size=GetSizeOfClass((CClass *)lpVarIndex); 92 93 //mov rcx,object_size 94 op_mov_RV(sizeof(_int64),REG_RCX,object_size); 95 96 if(bUseHeap){ 97 //mov rax,rsi 98 op_mov_RR(REG_RAX,REG_RSI); 99 } 100 101 //rep movs byte ptr[rdi],byte ptr[rsi] 102 op_rep_movs(sizeof(BYTE)); 103 104 if(bUseHeap){ 105 //mov rcx,rax 106 op_mov_RR(REG_RCX,REG_RAX); 107 108 //call free 109 extern SUBINFO *pSub_free; 110 op_call(pSub_free); 111 } 112 113 return; 114 } 115 else{ 116 SetError(1,NULL,cp); 117 } 79 if( CalcType == DEF_OBJECT ){ 80 CClass *pVarClass = (CClass *)lpVarIndex; 81 CClass *pCalcClass = (CClass *)lpCalcIndex; 82 83 if( pVarClass->IsEquals( pCalcClass ) //等しい 84 || pVarClass->IsSubClass( pCalcClass ) ){ //派生・継承関係 85 86 //双方のオブジェクト型が一致、または派生・継承関係にあるとき 87 //※コピーを行う 88 89 //mov rsi,RightTermReg 90 op_mov_RR(REG_RSI,RightTermReg); 91 92 //mov rdi,VarReg 93 op_mov_RR(REG_RDI,VarReg); 94 95 int object_size = GetSizeOfClass((CClass *)lpVarIndex); 96 97 //mov rcx,object_size 98 op_mov_RV(sizeof(_int64),REG_RCX,object_size); 99 100 if(bUseHeap){ 101 //mov rax,rsi 102 op_mov_RR(REG_RAX,REG_RSI); 103 } 104 105 //rep movs byte ptr[rdi],byte ptr[rsi] 106 op_rep_movs(sizeof(BYTE)); 107 108 if(bUseHeap){ 109 //mov rcx,rax 110 op_mov_RR(REG_RCX,REG_RAX); 111 112 //call free 113 extern SUBINFO *pSub_free; 114 op_call(pSub_free); 115 } 116 117 return; 118 } 119 } 120 121 SetError(1,NULL,cp); 118 122 } 119 123 -
BasicCompiler64/Compile_Var.cpp
r27 r28 1229 1229 1230 1230 if(TypeInfo.type==DEF_OBJECT){ 1231 if(TypeInfo.u.pobj_Class->Is HoldAbstractFunction()){1231 if(TypeInfo.u.pobj_Class->IsAbstract()){ 1232 1232 //抽象クラスだったとき 1233 1233 SetError(125,TypeInfo.u.pobj_Class->name,cp); -
BasicCompiler_Common/Class.cpp
r27 r28 25 25 char init_buf[VN_SIZE]; 26 26 char constract_parameter[VN_SIZE]; 27 if(!GetDimentionFormat(buffer,VarName,SubScripts,&TypeInfo,init_buf,constract_parameter)) 28 return; 27 GetDimentionFormat(buffer,VarName,SubScripts,&TypeInfo,init_buf,constract_parameter); 29 28 30 29 //重複チェック 31 30 if(pobj_c->DupliCheckAll(VarName)){ 32 31 SetError(15,VarName,cp); 33 return;34 32 } 35 33 36 34 if(TypeInfo.type==DEF_OBJECT){ 37 if(TypeInfo.u.pobj_Class->Is HoldAbstractFunction()){35 if(TypeInfo.u.pobj_Class->IsAbstract()){ 38 36 //抽象クラスだったとき 39 37 SetError(125,TypeInfo.u.pobj_Class->name,cp); … … 303 301 if( psi == ppobj_StaticMethod[i]->psi ) break; 304 302 } 305 if( i == i MethodNum ){303 if( i == iStaticMethodNum ){ 306 304 return NULL; 307 305 } … … 326 324 } 327 325 LONG_PTR CClass::GetVtblGlobalOffset(void){ 326 327 //既に存在する場合はそれを返す 328 328 if(vtbl_offset!=-1) return vtbl_offset; 329 330 331 ////////////////////////////////////// 332 // 存在しないときは新たに生成する 333 ////////////////////////////////////// 329 334 330 335 SUBINFO **ppsi; … … 332 337 333 338 //関数テーブルに値をセット 334 int i,i2,i3=0; 335 for(i=0;i < iMethodNum;i++){ 339 for( int i=0, i2=0; i < iMethodNum; i++ ){ 336 340 if(ppobj_Method[i]->bVirtual){ 337 for(i2=iMethodNum-1; i2>=i; i2--){ 338 if(lstrcmp(ppobj_Method[i]->psi->name,ppobj_Method[i2]->psi->name)==0){ 339 pobj_CompilingClass->ppobj_Method[i2]->psi->bUse=1; 340 341 if(ppobj_Method[i2]->bAbstract){ 342 extern int cp; 343 SetError(300,NULL,cp); 344 345 ppsi[i3]=0; 346 } 347 else ppsi[i3]=pobj_CompilingClass->ppobj_Method[i2]->psi; 348 i3++; 349 350 break; 351 } 352 } 341 ppobj_Method[i]->psi->bUse=1; 342 343 if(ppobj_Method[i]->bAbstract){ 344 extern int cp; 345 SetError(300,NULL,cp); 346 347 ppsi[i2]=0; 348 } 349 else ppsi[i2]=ppobj_Method[i]->psi; 350 i2++; 353 351 } 354 352 } … … 356 354 vtbl_offset=AddDataTable((char *)ppsi,vtbl_num*sizeof(LONG_PTR)); 357 355 358 for( i=0;i<vtbl_num;i++){356 for( int i=0; i < vtbl_num; i++ ){ 359 357 pobj_Reloc->AddSchedule_DataSection(vtbl_offset+i*sizeof(LONG_PTR)); 360 358 } … … 379 377 } 380 378 } 381 BOOL CClass::IsHoldAbstractFunction(void){379 bool CClass::IsAbstract(){ 382 380 //未実装の仮想関数を持つ場合は1を返す 383 381 384 int i,i2,i3=0; 385 for(i=0;i < iMethodNum;i++){ 382 for( int i=0; i < iMethodNum; i++ ){ 386 383 if(ppobj_Method[i]->bVirtual){ 387 for(i2=iMethodNum-1; i2>=i; i2--){ 388 if(lstrcmp(ppobj_Method[i]->psi->name,ppobj_Method[i2]->psi->name)==0){ 389 390 if(ppobj_Method[i2]->bAbstract){ 391 return 1; 392 } 393 394 break; 395 } 384 if(ppobj_Method[i]->bAbstract){ 385 return true; 396 386 } 397 387 } … … 399 389 400 390 //コンポジションの関係にあるメンバも検査する 401 for(i =0;i < iMemberNum;i++){391 for(int i=0;i < iMemberNum;i++){ 402 392 if(ppobj_Member[i]->TypeInfo.type==DEF_OBJECT){ 403 if(ppobj_Member[i]->TypeInfo.u.pobj_Class->Is HoldAbstractFunction())404 return 1;405 } 406 } 407 408 return 0;393 if(ppobj_Member[i]->TypeInfo.u.pobj_Class->IsAbstract()) 394 return true; 395 } 396 } 397 398 return false; 409 399 } 410 400 … … 460 450 return isCompilingDestructor; 461 451 } 452 453 454 //自身と等しいクラスかどうかを確認 455 bool CClass::IsEquals( CClass *pClass ){ 456 if( this == pClass ) return true; 457 return false; 458 } 459 460 //自身の派生クラスかどうかを確認 461 bool CClass::IsSubClass( CClass *pClass ){ 462 pClass = pClass->pobj_InheritsClass; 463 while( pClass ){ 464 if( this == pClass ) return true; 465 pClass = pClass->pobj_InheritsClass; 466 } 467 return false; 468 } 469 462 470 463 471 -
BasicCompiler_Common/Class.h
r27 r28 103 103 BOOL DupliCheckMember(char *name); 104 104 105 //メソッド取得 105 106 CMethod *GetMethodInfo( SUBINFO *psi ); 106 107 CMethod *GetStaticMethodInfo( SUBINFO *psi ); 108 109 //メソッドの存在を確認 107 110 bool IsExistMethod( char *name ); 108 111 bool IsExistStaticMethod( char *name ); … … 116 119 LONG_PTR GetVtblGlobalOffset(void); 117 120 void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection); 118 BOOL IsHoldAbstractFunction(void);121 bool IsAbstract(); 119 122 120 123 … … 138 141 void NotifyFinishDestructorCompile(); 139 142 bool IsCompilingDestructor(); 143 144 145 //自身と等しいクラスかどうかを確認 146 bool IsEquals( CClass *pClass ); 147 148 //自身の派生クラスかどうかを確認 149 bool IsSubClass( CClass *pClass ); 140 150 141 151 -
BasicCompiler_Common/Overload.cpp
r5 r28 20 20 CParameter *pobj_parameter=0; 21 21 22 BOOL bStatic=0; 23 if(ObjectName[0]){ 24 if(pobj_DBClass->check(ObjectName)) bStatic=1; 22 char MethodName[VN_SIZE]; 23 if( !SplitMemberName( name, NULL, MethodName ) ) lstrcpy( MethodName, name ); 24 25 //メソッドの場合は静的かどうかを調べる 26 bool isStatic = false; 27 CClass *pClass = ppsi[0]->pobj_ParentClass; 28 if( pClass ){ 29 isStatic = pClass->IsExistStaticMethod( MethodName ); 25 30 } 26 31 27 32 char temporary[VN_SIZE]; 28 if((ObjectName[0]||ppsi[0]->pobj_ParentClass) &&bStatic==0){33 if((ObjectName[0]||ppsi[0]->pobj_ParentClass) && isStatic == false ){ 29 34 //Thisポインタ(第一パラメータ)のダミーを作成 30 35 if(Parameter[0]) sprintf(temporary,"0%c%cVoidPtr,%s",1,ESC_AS,Parameter); -
BasicCompiler_Common/Subroutine.cpp
r5 r28 64 64 } 65 65 66 void GetObjectName(char *name,char *ObjectName,int *pRefType){66 void SplitObjectName(char *name,char *ObjectName,int *pRefType){ 67 67 int i4; 68 68 for(i4=lstrlen(name)-1;i4>=0;i4--){ … … 83 83 } 84 84 } 85 bool SplitMemberName( const char *desc, char *object, char *member ){ 86 int i; 87 for(i=lstrlen(desc)-1;i>=0;i--){ 88 if(desc[i]=='.'||(desc[i]==1&&desc[i+1]==ESC_PSMEM)) 89 break; 90 } 91 if(i==-1) return false; 92 else{ 93 if(desc[i]=='.') 94 lstrcpy(member,desc+i+1); 95 else 96 lstrcpy(member,desc+i+2); 97 98 if( object ){ 99 lstrcpy( object, desc ); 100 object[i]=0; 101 } 102 } 103 104 return true; 105 } 85 106 int GetReturnTypeOfProc(int idProc,void *pInfo,char *name,char *Parameter,LONG_PTR *plpRetIndex){ 86 107 int ret_type; … … 101 122 char ObjectName[VN_SIZE]; 102 123 int RefType; 103 GetObjectName(name,ObjectName,&RefType);124 SplitObjectName(name,ObjectName,&RefType); 104 125 105 126 … … 168 189 char ObjectName[VN_SIZE]; 169 190 int RefType; 170 GetObjectName(VarName,ObjectName,&RefType);191 SplitObjectName(VarName,ObjectName,&RefType); 171 192 172 193 //オーバーロード用の関数リストを作成 -
BasicCompiler_Common/common.h
r26 r28 545 545 int GetCallProcName(char *buffer,char *name); 546 546 int GetProc(char *name,void **ppInfo); 547 void GetObjectName(char *name,char *ObjectName,int *pRefType); 547 void SplitObjectName(char *name,char *ObjectName,int *pRefType); 548 bool SplitMemberName( const char *desc, char *object, char *member ); 548 549 int GetReturnTypeOfProc(int idProc,void *pInfo,char *name,char *Parameter,LONG_PTR *plpRetIndex); 549 550 BOOL GetReturnTypeOfPropertyMethod(char *variable,char *RightSide,TYPEINFO *pRetTypeInfo); -
BasicCompiler_Common/error.cpp
r27 r28 276 276 //一般エラーまたは警告 277 277 i2=0; //ここにブレークポイントをおく 278 279 if(num>-100){ 280 //エラーのみ 281 i2=0; 282 } 283 278 284 } 279 285 -
BasicCompiler_Common/hash.cpp
r27 r28 83 83 int i; 84 84 85 86 85 char name[VN_SIZE]; 87 86 … … 102 101 char ObjName[VN_SIZE]; //オブジェクト変数 103 102 char NestMember[VN_SIZE]; //入れ子メンバ 104 BOOL bObjectMember; 105 lstrcpy(ObjName,name); 106 for(i=lstrlen(ObjName)-1;i>=0;i--){ 107 if(ObjName[i]=='.'||(ObjName[i]==1&&ObjName[i+1]==ESC_PSMEM)) 108 break; 109 } 110 if(i==-1) bObjectMember=0; 111 else{ 112 if(ObjName[i]=='.') 113 lstrcpy(NestMember,ObjName+i+1); 114 else 115 lstrcpy(NestMember,ObjName+i+2); 116 ObjName[i]=0; 117 bObjectMember=1; 118 } 119 120 if(bObjectMember){ 103 bool isObjectMember = SplitMemberName( name, ObjName, NestMember ); 104 if( !isObjectMember ) lstrcpy(ObjName,name); 105 106 if(isObjectMember){ 121 107 //オブジェクトのメンバ関数の場合 122 108 … … 129 115 else{ 130 116 pobj_c=pobj_DBClass->check(ObjName); 131 if( ! pobj_c ){ 117 if( pobj_c ){ 118 isStatic = true; 119 } 120 else{ 132 121 //"->"によってオブジェクトを指定する通常のメンバ関数呼び出し 133 122 int type = GetVarType(ObjName,(LONG_PTR *)&pobj_c,0); … … 136 125 } 137 126 138 // 静的メソッドから取得 139 for(i=0;i<pobj_c->iStaticMethodNum;i++){ 140 if(lstrcmp(NestMember,pobj_c->ppobj_StaticMethod[i]->psi->name)==0){ 141 ppArray_si[num]=pobj_c->ppobj_StaticMethod[i]->psi; 142 num++; 143 } 144 } 145 146 //動的メソッドから取得 147 148 //※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う 149 for(i=pobj_c->iMethodNum-1;i>=0;i--){ 150 if(lstrcmp(NestMember,pobj_c->ppobj_Method[i]->psi->name)==0){ 151 ppArray_si[num]=pobj_c->ppobj_Method[i]->psi; 152 num++; 127 if( isStatic ){ 128 // 静的メソッドから取得 129 for(i=0;i<pobj_c->iStaticMethodNum;i++){ 130 if(lstrcmp(NestMember,pobj_c->ppobj_StaticMethod[i]->psi->name)==0){ 131 ppArray_si[num]=pobj_c->ppobj_StaticMethod[i]->psi; 132 num++; 133 } 134 } 135 } 136 else{ 137 //動的メソッドから取得 138 139 //※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う 140 for(i=pobj_c->iMethodNum-1;i>=0;i--){ 141 if(lstrcmp(NestMember,pobj_c->ppobj_Method[i]->psi->name)==0){ 142 ppArray_si[num]=pobj_c->ppobj_Method[i]->psi; 143 num++; 144 } 153 145 } 154 146 }
Note:
See TracChangeset
for help on using the changeset viewer.