Changeset 63 in dev for BasicCompiler32
- Timestamp:
- Feb 23, 2007, 2:12:26 AM (18 years ago)
- Location:
- BasicCompiler32
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/CParameter.cpp
r59 r63 130 130 131 131 void CParameter::SetObjectParameter(CClass *pobj_Class,LPSTR Parameter){ 132 int object_size; 133 object_size=GetSizeOfClass(pobj_Class); 132 int object_size = pobj_Class->GetSize(); 134 133 135 134 //push object_size -
BasicCompiler32/Compile_CallProc.cpp
r51 r63 259 259 ////////////////////////////////////////////////////// 260 260 261 int object_size; 262 object_size=GetSizeOfClass(psi->u.Return_pobj_c); 261 int object_size = psi->u.Return_pobj_c->GetSize(); 263 262 264 263 //push object_size -
BasicCompiler32/Compile_ProcOp.cpp
r55 r63 515 515 516 516 //実体クラスを持つメンバのコンストラクタ(引数有りを除く)を呼び出す 517 int offset;518 int MemberTypeSize;519 int MemberObjectNum;520 if(pobj_CompilingClass->vtbl_num) offset=PTR_SIZE;521 else offset=0;522 517 for(i3=0;i3<pobj_CompilingClass->iMemberNum;i3++){ 523 518 CMember *pMember = pobj_CompilingClass->ppobj_Member[i3]; 524 MemberTypeSize=519 int MemberTypeSize= 525 520 GetTypeSize(pMember->TypeInfo.type, 526 521 pMember->TypeInfo.u.lpIndex); 527 522 528 MemberObjectNum=523 int MemberObjectNum= 529 524 JumpSubScripts(pMember->SubScripts); 530 525 531 offset=GetSizeOfClassMember(pobj_CompilingClass,pMember->name,NULL);526 int offset = pobj_CompilingClass->GetMemberOffset( pMember->name, NULL ); 532 527 533 528 if(pMember->TypeInfo.type==DEF_OBJECT && pMember->IsRef() == false){ … … 561 556 pobj_CompilingClass->IsAbstract()==false){ 562 557 //関数テーブルに値をセット 563 offset=pobj_CompilingClass->GetVtblGlobalOffset();558 int offset = (int)pobj_CompilingClass->GetVtblGlobalOffset(); 564 559 565 560 //mov eax,offset -
BasicCompiler32/Compile_Set_Var.cpp
r62 r63 46 46 //※コピーを行う 47 47 48 int object_size; 49 object_size=GetSizeOfClass((CClass *)lpVarIndex); 48 int object_size = pVarClass->GetSize(); 50 49 51 50 //mov ecx,object_size -
BasicCompiler32/Compile_Var.cpp
r62 r63 25 25 *pType=MAKE_PTR_TYPE(NATURAL_TYPE(*pType),PTR_LEVEL(*pType)-1); 26 26 if((*pType)==DEF_OBJECT){ 27 CClass *pClass = (CClass *)lpIndex; 28 int objsize = pClass->GetSize(); 29 27 30 //imul ebx,objsize 28 31 OpBuffer[obp++]=(char)0x69; 29 32 OpBuffer[obp++]=(char)0xDB; 30 *((long *)(OpBuffer+obp))= GetSizeOfClassMember((CClass *)lpIndex,NULL,NULL);33 *((long *)(OpBuffer+obp))=objsize; 31 34 obp+=sizeof(long); 32 35 } … … 158 161 } 159 162 BOOL GetMemberOffset(bool isErrorEnabled, bool isWriteAccess, CClass *pobj_c, char *member, int *pType, RELATIVE_VAR *pRelativeVar, LONG_PTR *plpNestIndex, BOOL bPrivateAccess){ 160 int i ,offset;163 int i; 161 164 162 165 //クラス、配列の構成要素を解析する … … 173 176 //////////////////////////// 174 177 175 offset=GetSizeOfClassMember(pobj_c,VarName,&i);178 int offset=pobj_c->GetMemberOffset( VarName, &i ); 176 179 if(i==pobj_c->iMemberNum){ 177 180 if(isErrorEnabled) SetError(103,VarName,cp); … … 789 792 i=GetOneParameter(InitBuf,i,temporary); 790 793 791 i3= GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);794 i3=pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL ); 792 795 793 796 if(!SetInitGlobalData(offset+i3, … … 922 925 i=GetOneParameter(InitBuf,i,temporary); 923 926 924 i3 =GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);927 i3 = pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL ); 925 928 926 929 if(!InitLocalVar(offset+i3, -
BasicCompiler32/NumOpe.cpp
r56 r63 75 75 76 76 extern CClass *pobj_StringClass; 77 int object_size; 78 object_size=GetSizeOfClass(pobj_StringClass); 77 int object_size = pobj_StringClass->GetSize(); 79 78 80 79 //push object_size -
BasicCompiler32/OperatorProc.cpp
r51 r63 125 125 ////////////////////////////////////////////////////// 126 126 127 int object_size; 128 object_size=GetSizeOfClass(psi->u.Return_pobj_c); 127 int object_size = psi->u.Return_pobj_c->GetSize(); 129 128 130 129 //push object_size -
BasicCompiler32/VarList.cpp
r55 r63 165 165 } 166 166 167 LONG_PTR offset; 168 offset=GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i]->name,&i2); 167 LONG_PTR offset = pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i]->name, &i2 ); 169 168 170 169 if(pobj_c->ppobj_Member[i]->SubScripts[0]!=-1){ … … 423 422 424 423 for(i=0;i<psi->pobj_ParentClass->iMemberNum;i++){ 425 offset =GetSizeOfClassMember(psi->pobj_ParentClass,psi->pobj_ParentClass->ppobj_Member[i]->name,&i2);424 offset = psi->pobj_ParentClass->GetMemberOffset( psi->pobj_ParentClass->ppobj_Member[i]->name, &i2 ); 426 425 427 426 if(psi->pobj_ParentClass->ppobj_Member[i]->SubScripts[0]!=-1){ -
BasicCompiler32/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*=GetSizeOfClass((CClass *)lpIndex); 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
Note:
See TracChangeset
for help on using the changeset viewer.