Ignore:
Timestamp:
Apr 24, 2007, 3:17:29 AM (17 years ago)
Author:
dai_9181
Message:

名前空間機能をグローバル関数に適用。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/DebugMiddleFile.cpp

    r88 r100  
    205205
    206206    //プロシージャ情報
    207     extern UserProc **ppSubHash;
     207    extern GlobalProc **ppSubHash;
    208208    extern int SubNum;
    209     UserProc *pUserProc;
     209    GlobalProc *pUserProc;
    210210    *(long *)(buffer+i2)=SubNum;
    211211    i2+=sizeof(long);
     
    574574
    575575    //プロシージャ情報
    576     UserProc *pUserProc;
     576    GlobalProc *pUserProc;
    577577    SubNum=*(long *)(buffer+i2);
    578578    i2+=sizeof(long);
    579     ppSubHash=(UserProc **)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,MAX_HASH*sizeof(UserProc *));
     579    ppSubHash=(GlobalProc **)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,MAX_HASH*sizeof(GlobalProc *));
    580580    for(int i6=0;i6<SubNum;i6++){
    581581        char szParentClassName[VN_SIZE];
     
    596596
    597597        // オブジェクトを生成
    598         pUserProc = new UserProc( name, UserProc::Function, false, false, false );
     598        // TODO: 名前空間が未完成
     599        pUserProc = new GlobalProc( NamespaceScopes(), name, Procedure::Function, false, false, false );
    599600        pUserProc->pNextData=0;
    600601        pUserProc->id=id;
     
    664665        i4=hash_default(pUserProc->GetName().c_str());
    665666
    666         UserProc *psi2;
     667        GlobalProc *psi2;
    667668        if(ppSubHash[i4]){
    668669            psi2=ppSubHash[i4];
     
    730731        i2+=sizeof(long);
    731732        for( i4=0; i4<nMethod; i4++ ){
    732             CMethod *method = new CMethod();
    733 
    734             method->dwAccess=*(long *)(buffer+i2);
     733
     734            DWORD dwAccess=*(long *)(buffer+i2);
    735735            i2+=sizeof(long);
    736736
     
    739739            i2+=lstrlen(buffer+i2)+1;
    740740
    741             if(szInherits[0])
    742                 method->pobj_InheritsClass=pobj_DBClass->check(szInherits);
    743             else method->pobj_InheritsClass=0;
     741            CClass *pobj_InheritsClass = NULL;
     742            if(szInherits[0]){
     743                pobj_InheritsClass=pobj_DBClass->check(szInherits);
     744            }
    744745
    745746            lstrcpy(temp2,buffer+i2);
     
    747748
    748749            CClass *pobj_temp_c;
    749             pobj_temp_c=method->pobj_InheritsClass;
     750            pobj_temp_c=pobj_InheritsClass;
    750751            if(pobj_temp_c==0) pobj_temp_c=pobj_c;
    751752            i5=hash_default(temp2);
     
    755756                pUserProc=pUserProc->pNextData;
    756757            }
    757             method->pUserProc=pUserProc;
     758
     759            CMethod *method = new CMethod( pUserProc, dwAccess, 0,0,false, false);
     760            method->pobj_InheritsClass = pobj_InheritsClass;
    758761
    759762            pobj_c->methods.push_back( method );
     
    795798
    796799
    797     extern UserProc **ppSubHash;
     800    extern GlobalProc **ppSubHash;
    798801    ppSubHash=this->ppSubHash;
    799802    pSub_DebugSys_EndProc=GetSubHash("_DebugSys_EndProc");
     
    951954    extern char **ppMacroNames;
    952955    ppMacroNames=0;
    953     extern UserProc **ppSubHash;
     956    extern GlobalProc **ppSubHash;
    954957    extern int SubNum;
    955958    ppSubHash=this->ppSubHash;
Note: See TracChangeset for help on using the changeset viewer.