Changeset 63 in dev for BasicCompiler32/Compile_Var.cpp
- Timestamp:
- Feb 23, 2007, 2:12:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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,
Note:
See TracChangeset
for help on using the changeset viewer.