Changeset 75 in dev for BasicCompiler_Common/Class.cpp


Ignore:
Timestamp:
Mar 20, 2007, 4:36:16 AM (17 years ago)
Author:
dai_9181
Message:

TYPEINFO→Typeへのリファクタリングを実施。64bitはほぼ完了。32bitが全般的に未完成。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Class.cpp

    r73 r75  
    1616
    1717
    18 CMember::CMember( CClass *pobj_c, DWORD access, bool isConst, bool isRef, char *buffer, int NowLine ){
     18CMember::CMember( CClass *pobj_c, DWORD access, bool isConst, bool isRef, char *buffer, int nowLine ){
    1919    extern int cp;
    2020
     
    2323    char init_buf[VN_SIZE];
    2424    char constract_parameter[VN_SIZE];
    25     GetDimentionFormat(buffer,isRef,VarName,SubScripts,&TypeInfo,init_buf,constract_parameter);
     25    GetDimentionFormat(buffer,VarName,SubScripts,*this,init_buf,constract_parameter);
    2626
    2727    //重複チェック
     
    3030    }
    3131
    32     if(TypeInfo.type==DEF_OBJECT){
    33         if(TypeInfo.u.pobj_Class->IsAbstract()){
     32    if( IsObject() ){
     33        if( GetClass().IsAbstract() ){
    3434            //抽象クラスだったとき
    35             SetError(125,TypeInfo.u.pobj_Class->name,cp);
     35            SetError(125,GetClass().name,cp);
    3636        }
    3737    }
     
    4747    this->isConst = isConst;
    4848
    49     //参照型かどうか
    50     this->isRef = isRef;
    51 
    5249    //初期データ
    5350    InitBuf=(char *)HeapAlloc(hHeap,0,lstrlen(init_buf)+1);
     
    5956
    6057    //ソースコードの位置
    61     source_code_address=NowLine;
    62 }
    63 CMember::CMember(CMember *pobj){
    64     //コピーコンストラクタ
    65     memset(this,0,sizeof(CMember));
     58    source_code_address=nowLine;
     59}
     60CMember::CMember(CMember &member):
     61    Type( member )
     62{
    6663
    6764    //name
    68     name=(char *)HeapAlloc(hHeap,0,lstrlen(pobj->name)+1);
    69     lstrcpy(name,pobj->name);
     65    name=(char *)HeapAlloc(hHeap,0,lstrlen(member.name)+1);
     66    lstrcpy(name,member.name);
    7067
    7168    //定数扱いかどうか
    72     isConst = pobj->isConst;
    73 
    74     //参照型かどうか
    75     isRef = pobj->isRef;
     69    isConst = member.isConst;
    7670
    7771    //SubScripts
    78     memcpy(SubScripts,pobj->SubScripts,MAX_ARRAYDIM*sizeof(int));
    79 
    80     //TypeInfo
    81     TypeInfo=pobj->TypeInfo;
     72    memcpy(SubScripts,member.SubScripts,MAX_ARRAYDIM*sizeof(int));
    8273
    8374    //ソースコードの位置
    84     source_code_address=pobj->source_code_address;
     75    source_code_address=member.source_code_address;
    8576}
    8677CMember::CMember(){
     
    9586bool CMember::IsConst(){
    9687    return isConst;
    97 }
    98 bool CMember::IsRef(){
    99     return isRef;
    100 }
    101 
    102 int CMember::GetSize(){
    103     //メンバサイズを取得
    104     return GetTypeSize(TypeInfo.type,TypeInfo.u.lpIndex);
    10588}
    10689
     
    126109                temporary,
    127110                member->SubScripts,
    128                 member->TypeInfo,
    129                 GetTypeSize(member->TypeInfo.type,member->TypeInfo.u.lpIndex),
     111                *member,
    130112                member->InitBuf,
    131113                member->ConstractParameter,
     
    151133    memset(this,0,sizeof(CMethod));
    152134
    153     psi=pobj->psi;
     135    pUserProc=pobj->pUserProc;
    154136
    155137    bAbstract=pobj->bAbstract;
     
    224206    iMemberNum=pInheritsClass->iMemberNum;
    225207    for(i3=0;i3<pInheritsClass->iMemberNum;i3++){
    226         ppobj_Member[i3]=new CMember(pInheritsClass->ppobj_Member[i3]);
     208        ppobj_Member[i3]=new CMember( *pInheritsClass->ppobj_Member[i3] );
    227209
    228210        //dwAccess
     
    263245    iMemberNum++;
    264246}
    265 void CClass::AddStaticMember( DWORD dwAccess, bool isConst, bool isRef, char *buffer, int NowLine ){
    266     CMember *member = new CMember( this, dwAccess, isConst, isRef, buffer, NowLine );
     247void CClass::AddStaticMember( DWORD dwAccess, bool isConst, bool isRef, char *buffer, int nowLine ){
     248    CMember *member = new CMember( this, dwAccess, isConst, isRef, buffer, nowLine );
    267249    staticMembers.push_back( member );
    268250}
    269 void CClass::AddMethod( SubInfo *psi,DWORD dwAccess, bool isConst, BOOL bAbstract, BOOL bVirtual ){
     251void CClass::AddMethod( UserProc *pUserProc,DWORD dwAccess, bool isConst, BOOL bAbstract, BOOL bVirtual ){
    270252    CMethod *method = new CMethod();
    271     method->psi = psi;
     253    method->pUserProc = pUserProc;
    272254    method->dwAccess = dwAccess;
    273255    method->isConst = isConst;
     
    277259
    278260    methods.push_back( method );
    279 }
    280 void CClass::AddStaticMethod(SubInfo *psi,DWORD dwAccess){
     261
     262    // プロシージャオブジェクトと関連付け
     263    pUserProc->SetMethod( method );
     264}
     265void CClass::AddStaticMethod(UserProc *pUserProc,DWORD dwAccess){
    281266    CMethod *method = new CMethod();
    282     method->psi=psi;
     267    method->pUserProc=pUserProc;
    283268    method->dwAccess=dwAccess;
    284269    method->bAbstract=0;
     
    287272
    288273    staticMethods.push_back( method );
     274
     275    // プロシージャオブジェクトと関連付け
     276    pUserProc->SetMethod( method );
    289277}
    290278BOOL CClass::DupliCheckAll(const char *name){
     
    296284    //メソッド
    297285    foreach( CMethod *method, methods ){
    298         if( lstrcmp( name, method->psi->name ) == 0 ){
     286        if( lstrcmp( name, method->pUserProc->GetName().c_str() ) == 0 ){
    299287            return 1;
    300288        }
     
    322310    return 0;
    323311}
    324 CMethod *CClass::GetMethodInfo( SubInfo *psi ){
     312CMethod *CClass::GetMethodInfo( UserProc *pUserProc ) const
     313{
    325314    for( int i=(int)methods.size()-1; i>=0; i-- ){
    326         if( psi == methods[i]->psi ) return methods[i];
     315        if( pUserProc == methods[i]->pUserProc ) return methods[i];
    327316    }
    328317    return NULL;
    329318}
    330 CMethod *CClass::GetStaticMethodInfo( SubInfo *psi ){
     319CMethod *CClass::GetStaticMethodInfo( UserProc *pUserProc ) const
     320{
    331321    for( int i=(int)staticMethods.size()-1; i>=0; i-- ){
    332         if( psi == staticMethods[i]->psi ) return staticMethods[i];
     322        if( pUserProc == staticMethods[i]->pUserProc ) return staticMethods[i];
    333323    }
    334324    return NULL;
    335325}
    336 bool CClass::IsExistMethod( const char *name ){
     326bool CClass::IsExistMethod( const char *name ) const
     327{
    337328    foreach( CMethod *method, methods ){
    338         if( lstrcmp( method->psi->name, name ) == 0 ) return true;
     329        if( method->pUserProc->GetName() == name ) return true;
    339330    }
    340331    return false;
    341332}
    342 bool CClass::IsExistStaticMethod( const char *name ){
     333bool CClass::IsExistStaticMethod( const char *name ) const
     334{
    343335    foreach( CMethod *method, staticMethods ){
    344         if( lstrcmp( method->psi->name, name ) == 0 ) return true;
     336        if( method->pUserProc->GetName() == name ) return true;
    345337    }
    346338    return false;
    347339}
    348340
    349 void CClass::EnumStaticMethod( const char *methodName, std::vector<SubInfo *> &subs ) const
     341void CClass::EnumStaticMethod( const char *methodName, std::vector<UserProc *> &subs ) const
    350342{
    351343    foreach( CMethod *method, staticMethods ){
    352         if(lstrcmp(methodName,method->psi->name)==0){
    353             subs.push_back( method->psi );
    354         }
    355     }
    356 }
    357 
    358 void CClass::EnumMethod( const char *methodName, std::vector<SubInfo *> &subs ) const
     344        if( method->pUserProc->GetName() == methodName ){
     345            subs.push_back( method->pUserProc );
     346        }
     347    }
     348}
     349
     350void CClass::EnumMethod( const char *methodName, std::vector<UserProc *> &subs ) const
    359351{
    360352    //オブジェクトのメンバ関数の場合
    361353    //※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う
    362354    for( int i=(int)methods.size()-1; i>=0; i-- ){
    363         if(lstrcmp(methodName,methods[i]->psi->name)==0){
    364             subs.push_back( methods[i]->psi );
    365         }
    366     }
    367 }
    368 
    369 void CClass::EnumMethod( const BYTE idOperatorCalc, std::vector<SubInfo *> &subs ) const
     355        if( methods[i]->pUserProc->GetName() == methodName ){
     356            subs.push_back( methods[i]->pUserProc );
     357        }
     358    }
     359}
     360
     361void CClass::EnumMethod( const BYTE idOperatorCalc, std::vector<UserProc *> &subs ) const
    370362{
    371363    //オブジェクトのメンバ関数の場合
    372364    //※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う
    373365    for( int i=(int)methods.size()-1; i>=0; i-- ){
    374         SubInfo *psi = methods[i]->psi;
    375         char *temp = psi->name;
     366        UserProc *pUserProc = methods[i]->pUserProc;
     367        const char *temp = pUserProc->GetName().c_str();
    376368        if(temp[0]==1&&temp[1]==ESC_OPERATOR){
    377369            if((BYTE)temp[2]==idOperatorCalc){
    378                 subs.push_back( psi );
     370                subs.push_back( pUserProc );
    379371            }
    380372        }
     
    423415        //アラインメントを算出
    424416        int member_size;
    425         if(pMember->TypeInfo.type==DEF_STRUCT){
     417        if( pMember->IsStruct() ){
    426418            //メンバクラスのアラインメントを取得
    427             member_size=pMember->TypeInfo.u.pobj_Class->GetAlignment();
     419            member_size=pMember->GetClass().GetAlignment();
    428420        }
    429421        else{
     
    486478        CMember *pMember = ppobj_Member[i];
    487479
    488         if(pMember->TypeInfo.type==DEF_STRUCT){
     480        if(pMember->IsStruct()){
    489481            //メンバクラスのアラインメントを取得
    490             member_size=pMember->TypeInfo.u.pobj_Class->GetAlignment();
     482            member_size=pMember->GetClass().GetAlignment();
    491483        }
    492484        else{
     
    508500
    509501
    510 int CClass::GetFuncNumInVtbl( const SubInfo *psi ) const
     502int CClass::GetFuncNumInVtbl( const UserProc *pUserProc ) const
    511503{
    512504    int n = 0;
    513505    foreach( CMethod *method, methods ){
    514         if( method->psi == psi ) break;
    515         if( method->psi->bVirtual ) n++;
     506        if( method->pUserProc == pUserProc ) break;
     507        if( method->bVirtual ) n++;
    516508    }
    517509    return n;
     
    527519    //////////////////////////////////////
    528520
    529     SubInfo **ppsi;
    530     ppsi=(SubInfo **)HeapAlloc(hHeap,0,vtbl_num*sizeof(SubInfo *));
     521    UserProc **ppsi;
     522    ppsi=(UserProc **)HeapAlloc(hHeap,0,vtbl_num*sizeof(UserProc *));
    531523
    532524    //関数テーブルに値をセット
     
    534526    foreach( CMethod *method, methods ){
    535527        if(method->bVirtual){
    536             method->psi->bUse=1;
     528            method->pUserProc->Using();
    537529
    538530            if(method->bAbstract){
     
    542534                ppsi[i2]=0;
    543535            }
    544             else ppsi[i2]=method->psi;
     536            else ppsi[i2]=method->pUserProc;
    545537            i2++;
    546538        }
     
    565557    int i;
    566558    for(i=0;i<vtbl_num;i++){
    567         SubInfo *psi;
    568         psi=(SubInfo *)pVtbl[i];
    569         if(!psi) continue;
    570         pVtbl[i]=psi->CompileAddress+ImageBase+MemPos_CodeSection;
    571     }
    572 }
    573 bool CClass::IsAbstract(){
     559        UserProc *pUserProc;
     560        pUserProc=(UserProc *)pVtbl[i];
     561        if(!pUserProc) continue;
     562        pVtbl[i]=pUserProc->beginOpAddress+ImageBase+MemPos_CodeSection;
     563    }
     564}
     565bool CClass::IsAbstract() const
     566{
    574567    //未実装の仮想関数を持つ場合はtrueを返す
    575568
     
    584577    //コンポジションの関係にあるメンバも検査する
    585578    for(int i=0;i < iMemberNum;i++){
    586         if(ppobj_Member[i]->TypeInfo.type==DEF_OBJECT){
    587             if(ppobj_Member[i]->TypeInfo.u.pobj_Class->IsAbstract())
     579        if(ppobj_Member[i]->IsObject()){
     580            if(ppobj_Member[i]->GetClass().IsAbstract())
    588581                return true;
    589582        }
     
    604597
    605598//コンストラクタをコンパイル中かどうかを判別
    606 bool CClass::IsCompilingConstructor(){
     599bool CClass::IsCompilingConstructor() const
     600{
    607601    return isCompilingConstructor;
    608602}
     
    619613
    620614//デストラクタをコンパイル中かどうかを判別
    621 bool CClass::IsCompilingDestructor(){
     615bool CClass::IsCompilingDestructor() const
     616{
    622617    return isCompilingDestructor;
    623618}
     
    625620
    626621//自身と等しいクラスかどうかを確認
    627 bool CClass::IsEquals( CClass *pClass ){
     622bool CClass::IsEquals( const CClass *pClass ) const
     623{
    628624    if( this == pClass ) return true;
    629625    return false;
     
    631627
    632628//自身の派生クラスかどうかを確認
    633 bool CClass::IsSubClass( CClass *pClass ){
     629bool CClass::IsSubClass( const CClass *pClass ) const
     630{
    634631    pClass = pClass->pobj_InheritsClass;
    635632    while( pClass ){
     
    641638
    642639//自身と等しいまたは派生クラスかどうかを確認
    643 bool CClass::IsEqualsOrSubClass( CClass *pClass ){
     640bool CClass::IsEqualsOrSubClass( const CClass *pClass ) const
     641{
    644642    if( IsEquals( pClass ) ) return true;
    645643    return IsSubClass( pClass );
     
    722720}
    723721
    724 CClass *CDBClass::AddClass(const char *name,int NowLine){
     722CClass *CDBClass::AddClass(const char *name,int nowLine){
    725723    //////////////////////////////////////////////////////////////////////////
    726724    // クラスを追加
     
    753751            if(lstrcmp(name,pobj_c2->name)==0){
    754752                //重複した場合
    755                 SetError(15,name,NowLine);
     753                SetError(15,name,nowLine);
    756754                return 0;
    757755            }
     
    781779            basbuf[i+1]==ESC_INTERFACE
    782780            )){
    783                 int NowLine;
    784                 NowLine=i;
     781                int nowLine;
     782                nowLine=i;
    785783
    786784                i+=2;
     
    802800
    803801                //クラスを追加
    804                 CClass *pClass = pobj_DBClass->AddClass(temporary,NowLine);
     802                CClass *pClass = pobj_DBClass->AddClass(temporary,nowLine);
    805803                if( pClass ){
    806                     if( basbuf[NowLine+1] == ESC_CLASS ){
     804                    if( basbuf[nowLine+1] == ESC_CLASS ){
    807805                        pClass->classType = CClass::Class;
    808806                    }
    809                     else if( basbuf[NowLine+1] == ESC_INTERFACE ){
     807                    else if( basbuf[nowLine+1] == ESC_INTERFACE ){
    810808                        pClass->classType = CClass::Interface;
    811809                    }
     
    820818
    821819void CDBClass::AddMethod(CClass *pobj_c, DWORD dwAccess, BOOL bStatic, bool isConst, BOOL bAbstract,
    822                          BOOL bVirtual, BOOL bOverride, char *buffer, int NowLine){
     820                         BOOL bVirtual, BOOL bOverride, char *buffer, int nowLine){
    823821    int i,i2;
    824822    char temporary[VN_SIZE];
     
    835833
    836834    //関数ハッシュへ登録
    837     SubInfo *psi;
    838     psi=AddSubData(buffer,NowLine,bVirtual,pobj_c,bStatic);
    839     if(!psi) return;
     835    UserProc *pUserProc;
     836    pUserProc=AddSubData(buffer,nowLine,bVirtual,pobj_c, (bStatic!=0) );
     837    if(!pUserProc) return;
    840838
    841839
     
    849847
    850848        //標準コンストラクタ(引数なし)
    851         if(psi->params.size()==0) fConstructor=1;
     849        if(pUserProc->Params().size()==0) fConstructor=1;
    852850
    853851        //強制的にConst修飾子をつける
     
    857855        //デストラクタの場合はその名前が正しいかチェックを行う
    858856        if(lstrcmp(temporary+1,pobj_c->name)!=0)
    859             SetError(117,NULL,NowLine);
     857            SetError(117,NULL,nowLine);
    860858        else
    861859            bDestructor=1;
     
    864862        // コンストラクタ、デストラクタのアクセシビリティをチェック
    865863        if(dwAccess!=ACCESS_PUBLIC){
    866             SetError(116,NULL,NowLine);
     864            SetError(116,NULL,nowLine);
    867865            dwAccess=ACCESS_PUBLIC;
    868866        }
     
    884882
    885883    if(pobj_c->DupliCheckMember(temporary)){
    886         SetError(15,temporary,NowLine);
     884        SetError(15,temporary,nowLine);
    887885        return;
    888886    }
     
    893891        if(method->pobj_InheritsClass) continue;
    894892
    895         if(lstrcmp(temporary,method->psi->name)==0){
    896             if( Parameter::Equals( method->psi->params, psi->params ) ){
     893        if( method->pUserProc->GetName() == temporary ){
     894            if( Parameter::Equals( method->pUserProc->Params(), pUserProc->Params() ) ){
    897895                //関数名、パラメータ属性が合致したとき
    898                 SetError(15,psi->name,NowLine);
     896                SetError(15,pUserProc->GetName().c_str(),nowLine);
    899897                return;
    900898            }
     
    903901
    904902    //仮想関数の場合
    905     if(bAbstract) psi->bCompile=1;
     903    if(bAbstract) pUserProc->CompleteCompile();
    906904
    907905    //メソッドのオーバーライド
    908906    foreach( CMethod *method, pobj_c->methods ){
    909         if(lstrcmp(temporary,method->psi->name)==0){
    910             if( Parameter::Equals( method->psi->params, psi->params ) ){
    911 
    912                 if(method->psi->bVirtual){
     907        if( method->pUserProc->GetName() == temporary ){
     908            if( Parameter::Equals( method->pUserProc->Params(), pUserProc->Params() ) ){
     909
     910                if(method->bVirtual){
    913911                    //メンバ関数を上書き
    914                     method->psi=psi;
     912                    method->pUserProc=pUserProc;
    915913                    method->bAbstract=0;
    916914
    917915                    if(!bOverride){
    918                         SetError(127,NULL,NowLine);
     916                        SetError(127,NULL,nowLine);
    919917                    }
    920918                    if(method->dwAccess!=dwAccess){
    921                         SetError(128,NULL,NowLine);
     919                        SetError(128,NULL,nowLine);
    922920                    }
     921
     922                    pUserProc->SetMethod( method );
    923923                    return;
    924924                }
     
    927927    }
    928928
    929     if(psi->bVirtual){
     929    if(bVirtual){
    930930        pobj_c->vtbl_num++;
    931931    }
    932932
    933933    if(bOverride){
    934         SetError(12,"Override",NowLine);
     934        SetError(12,"Override",nowLine);
    935935    }
    936936
    937937    if(bStatic){
    938         pobj_c->AddStaticMethod(psi,dwAccess);
     938        pobj_c->AddStaticMethod(pUserProc,dwAccess);
    939939    }
    940940    else{
    941         pobj_c->AddMethod(psi, dwAccess, isConst, bAbstract, bVirtual);
    942     }
    943 }
    944 
    945 BOOL CDBClass::MemberVar_LoopRefCheck(CClass *pobj_c){
     941        pobj_c->AddMethod(pUserProc, dwAccess, isConst, bAbstract, bVirtual);
     942    }
     943}
     944
     945BOOL CDBClass::MemberVar_LoopRefCheck(const CClass &objClass){
    946946    int i,i2,bRet=1;
    947     for(i=0;i<pobj_c->iMemberNum;i++){
    948         CMember *pMember = pobj_c->ppobj_Member[i];
    949         if(pMember->TypeInfo.type==DEF_OBJECT){
     947    for(i=0;i<objClass.iMemberNum;i++){
     948        const CMember *pMember = objClass.ppobj_Member[i];
     949        if(pMember->IsObject()){
    950950            //循環参照でないかをチェック
    951             if(pobj_LoopRefCheck->check(pMember->TypeInfo.u.pobj_Class->name)){
     951            if(pobj_LoopRefCheck->check(pMember->GetClass().name)){
    952952                extern int cp;
    953                 SetError(124,pMember->TypeInfo.u.pobj_Class->name,cp);
     953                SetError(124,pMember->GetClass().name,cp);
    954954                return 0;
    955955            }
    956956
    957             pobj_LoopRefCheck->add(pobj_c->name);
    958 
    959             i2=MemberVar_LoopRefCheck(pMember->TypeInfo.u.pobj_Class);
     957            pobj_LoopRefCheck->add(objClass.name);
     958
     959            i2=MemberVar_LoopRefCheck(pMember->GetClass());
    960960            if(bRet==1) bRet=i2;
    961961
    962             pobj_LoopRefCheck->del(pobj_c->name);
     962            pobj_LoopRefCheck->del(objClass.name);
    963963        }
    964964    }
     
    13471347
    13481348
    1349                         if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.type==DEF_OBJECT||
    1350                             pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.type==DEF_STRUCT){
    1351                             if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.u.pobj_Class->ppobj_Member==0){
     1349                        if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->IsObject()||
     1350                            pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->IsStruct()){
     1351                            if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->GetClass().ppobj_Member==0){
    13521352                                //参照先が読み取られていないとき
    1353                                 GetClass_recur(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.u.pobj_Class->name);
     1353                                GetClass_recur(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->GetClass().name);
    13541354                            }
    13551355                        }
    13561356
    13571357
    1358                         if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.type==DEF_OBJECT){
     1358                        if(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->IsObject()){
    13591359                            //循環参照のチェック
    13601360                            pobj_LoopRefCheck->add(pobj_c->name);
    1361                             if(!MemberVar_LoopRefCheck(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.u.pobj_Class)){
     1361                            if(!MemberVar_LoopRefCheck(pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->GetClass())){
    13621362                                //エラー回避
    1363                                 pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->TypeInfo.type=DEF_PTR_VOID;
     1363                                pobj_c->ppobj_Member[pobj_c->iMemberNum-1]->SetBasicType( DEF_PTR_VOID );
    13641364                            }
    13651365                            pobj_LoopRefCheck->del(pobj_c->name);
     
    14381438}
    14391439
    1440 void CDBClass::StartCompile( SubInfo *psi ){
    1441     pCompilingClass = psi->pobj_ParentClass;
     1440void CDBClass::StartCompile( UserProc *pUserProc ){
     1441    pCompilingClass = pUserProc->GetParentClassPtr();
    14421442    if( pCompilingClass ){
    1443         pCompilingMethod = pCompilingClass->GetMethodInfo( psi );
     1443        pCompilingMethod = pCompilingClass->GetMethodInfo( pUserProc );
    14441444        if( !pCompilingMethod ){
    1445             pCompilingMethod = pCompilingClass->GetStaticMethodInfo( psi );
     1445            pCompilingMethod = pCompilingClass->GetStaticMethodInfo( pUserProc );
    14461446            if( !pCompilingMethod ){
    14471447                SetError(300,NULL,cp);
Note: See TracChangeset for help on using the changeset viewer.