Changeset 63 in dev for BasicCompiler64/Compile_Var.cpp


Ignore:
Timestamp:
Feb 23, 2007, 2:12:26 AM (18 years ago)
Author:
dai_9181
Message:

CClass::GetSize、CClass::GetMemberOffsetを追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/Compile_Var.cpp

    r62 r63  
    4343        *pType=MAKE_PTR_TYPE(NATURAL_TYPE(*pType),PTR_LEVEL(*pType)-1);
    4444        if((*pType)==DEF_OBJECT){
     45            CClass *pClass = (CClass *)lpIndex;
    4546            //imul reg,objsize
    46             op_imul_value(sizeof(_int64),reg,GetSizeOfClassMember((CClass *)lpIndex,NULL,NULL));
     47            op_imul_value( sizeof(_int64), reg, pClass->GetSize() );
    4748        }
    4849        else{
     
    180181}
    181182BOOL 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;
    183184
    184185
     
    200201    ////////////////////////////
    201202
    202     offset=GetSizeOfClassMember(pobj_c,VarName,&i);
     203    int offset = pobj_c->GetMemberOffset( VarName, &i );
    203204    if(i==pobj_c->iMemberNum){
    204205        if(isErrorEnabled) SetError(103,VarName,cp);
     
    821822                i=GetOneParameter(InitBuf,i,temporary);
    822823
    823                 i3=GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);
     824                i3=pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL );
    824825
    825826                if(!SetInitGlobalData(offset+i3,
     
    959960                i=GetOneParameter(InitBuf,i,temporary);
    960961
    961                 i3=GetSizeOfClassMember(pobj_c,pobj_c->ppobj_Member[i2]->name,NULL);
     962                i3=pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL );
    962963
    963964                if(!InitLocalVar(offset+i3,
Note: See TracChangeset for help on using the changeset viewer.