Changeset 63 in dev for BasicCompiler64
- Timestamp:
- Feb 23, 2007, 2:12:26 AM (18 years ago)
- Location:
- BasicCompiler64
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/CParameter.cpp
r59 r63 118 118 ////////////////////////////////////////////////////// 119 119 120 int object_size; 121 object_size=GetSizeOfClass(pobj_Class); 120 int object_size = pobj_Class->GetSize(); 122 121 123 122 //mov rcx,object_size -
BasicCompiler64/Compile_CallProc.cpp
r51 r63 267 267 ////////////////////////////////////////////////////// 268 268 269 int object_size; 270 object_size=GetSizeOfClass(psi->u.Return_pobj_c); 269 int object_size = psi->u.Return_pobj_c->GetSize(); 271 270 272 271 //mov rcx,object_size -
BasicCompiler64/Compile_ProcOp.cpp
r51 r63 569 569 570 570 //実体クラスを持つメンバのコンストラクタ(引数有りを除く)を呼び出す 571 int offset;572 int MemberTypeSize;573 int MemberObjectNum;574 if(pobj_CompilingClass->vtbl_num) offset=PTR_SIZE;575 else offset=0;576 571 for(i3=0;i3<pobj_CompilingClass->iMemberNum;i3++){ 577 572 CMember *pMember = pobj_CompilingClass->ppobj_Member[i3]; 578 MemberTypeSize=573 int MemberTypeSize= 579 574 GetTypeSize(pMember->TypeInfo.type, 580 575 pMember->TypeInfo.u.lpIndex); 581 576 582 MemberObjectNum=577 int MemberObjectNum= 583 578 JumpSubScripts(pMember->SubScripts); 584 579 585 offset=GetSizeOfClassMember(pobj_CompilingClass,pMember->name,NULL);580 int offset = pobj_CompilingClass->GetMemberOffset( pMember->name, NULL ); 586 581 587 582 if(pMember->TypeInfo.type==DEF_OBJECT && pMember->IsRef() == false){ … … 608 603 pobj_CompilingClass->IsAbstract()==false){ 609 604 //関数テーブルに値をセット 610 offset=(int)pobj_CompilingClass->GetVtblGlobalOffset();605 int offset = (int)pobj_CompilingClass->GetVtblGlobalOffset(); 611 606 612 607 //mov rax,offset … … 672 667 //実体クラスを持つメンバのデストラクタを呼び出す 673 668 //※コンストラクタと逆順序で呼び出す 674 int offset;675 int MemberTypeSize;676 int MemberObjectNum;677 669 for(i3=pobj_CompilingClass->iMemberNum-1;i3>=0;i3--){ 678 670 CMember *pMember = pobj_CompilingClass->ppobj_Member[i3]; 679 MemberTypeSize=671 int MemberTypeSize= 680 672 GetTypeSize(pMember->TypeInfo.type, 681 673 pMember->TypeInfo.u.lpIndex); 682 674 683 MemberObjectNum=675 int MemberObjectNum= 684 676 JumpSubScripts(pMember->SubScripts); 685 677 686 offset=GetSizeOfClassMember(pobj_CompilingClass,pMember->name,NULL);678 int offset = pobj_CompilingClass->GetMemberOffset( pMember->name, NULL ); 687 679 688 680 if(pMember->TypeInfo.type==DEF_OBJECT && pMember->IsRef() == false){ -
BasicCompiler64/Compile_Set_Var.cpp
r62 r63 93 93 op_mov_RR(REG_RDI,VarReg); 94 94 95 int object_size = GetSizeOfClass((CClass *)lpVarIndex); 95 CClass *pClass = (CClass *)lpVarIndex; 96 int object_size = pClass->GetSize(); 96 97 97 98 //mov rcx,object_size -
BasicCompiler64/Compile_Var.cpp
r62 r63 43 43 *pType=MAKE_PTR_TYPE(NATURAL_TYPE(*pType),PTR_LEVEL(*pType)-1); 44 44 if((*pType)==DEF_OBJECT){ 45 CClass *pClass = (CClass *)lpIndex; 45 46 //imul reg,objsize 46 op_imul_value( sizeof(_int64),reg,GetSizeOfClassMember((CClass *)lpIndex,NULL,NULL));47 op_imul_value( sizeof(_int64), reg, pClass->GetSize() ); 47 48 } 48 49 else{ … … 180 181 } 181 182 BOOL GetMemberOffset(bool isErrorEnabled, bool isWriteAccess, CClass *pobj_c, char *member, int *pType, RELATIVE_VAR *pRelativeVar, LONG_PTR *plpNestIndex, BOOL bPrivateAccess){ 182 int i ,offset;183 int i; 183 184 184 185 … … 200 201 //////////////////////////// 201 202 202 offset=GetSizeOfClassMember(pobj_c,VarName,&i);203 int offset = pobj_c->GetMemberOffset( VarName, &i ); 203 204 if(i==pobj_c->iMemberNum){ 204 205 if(isErrorEnabled) SetError(103,VarName,cp); … … 821 822 i=GetOneParameter(InitBuf,i,temporary); 822 823 823 i3= GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);824 i3=pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL ); 824 825 825 826 if(!SetInitGlobalData(offset+i3, … … 959 960 i=GetOneParameter(InitBuf,i,temporary); 960 961 961 i3= GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);962 i3=pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL ); 962 963 963 964 if(!InitLocalVar(offset+i3, -
BasicCompiler64/NumOpe.cpp
r56 r63 15 15 16 16 extern CClass *pobj_StringClass; 17 int object_size; 18 object_size=GetSizeOfClass(pobj_StringClass); 17 int object_size = pobj_StringClass->GetSize(); 19 18 20 19 //mov rcx,object_size -
BasicCompiler64/OperatorProc.cpp
r51 r63 137 137 ////////////////////////////////////////////////////// 138 138 139 int object_size; 140 object_size=GetSizeOfClass(psi->u.Return_pobj_c); 139 int object_size = psi->u.Return_pobj_c->GetSize(); 141 140 142 141 //mov rcx,object_size -
BasicCompiler64/WatchList.cpp
r62 r63 78 78 if(PTR_LEVEL(*pType)){ 79 79 *pType=MAKE_PTR_TYPE(NATURAL_TYPE(*pType),PTR_LEVEL(*pType)-1); 80 if((*pType)==DEF_OBJECT) 81 array_num*=GetSizeOfClassMember((CClass *)lpIndex,NULL,NULL); 82 else 83 array_num*=GetTypeSize(*pType,-1); 80 if((*pType)==DEF_OBJECT){ 81 CClass *pClass = (CClass *)lpIndex; 82 array_num *= pClass->GetSize(); 83 } 84 else{ 85 array_num *= GetTypeSize(*pType,-1); 86 } 84 87 } 85 88 else{ … … 100 103 101 104 BOOL Debugging_GetMember(CClass *pobj_c,char *member,int *pType,RELATIVE_VAR *pRelativeVar,LONG_PTR *plpNestIndex,BOOL bPrivateAccess){ 102 int i,i2 ,offset;105 int i,i2; 103 106 104 107 //直接参照に切り替え … … 120 123 //////////////////////////// 121 124 122 offset=GetSizeOfClassMember(pobj_c,VarName,&i);125 int offset = pobj_c->GetMemberOffset( VarName, &i ); 123 126 if(i==pobj_c->iMemberNum) return 0; 124 127 -
BasicCompiler64/varlist.cpp
r55 r63 168 168 169 169 LONG_PTR offset; 170 offset= GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i]->name,&i2);170 offset=pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i]->name, &i2 ); 171 171 172 172 if(pobj_c->ppobj_Member[i]->SubScripts[0]!=-1){ … … 428 428 429 429 for(i=0;i<psi->pobj_ParentClass->iMemberNum;i++){ 430 offset= GetSizeOfClassMember(psi->pobj_ParentClass,psi->pobj_ParentClass->ppobj_Member[i]->name,&i2);430 offset=psi->pobj_ParentClass->GetMemberOffset( psi->pobj_ParentClass->ppobj_Member[i]->name,&i2); 431 431 432 432 if(psi->pobj_ParentClass->ppobj_Member[i]->SubScripts[0]!=-1){
Note:
See TracChangeset
for help on using the changeset viewer.