Ignore:
Timestamp:
Mar 25, 2007, 2:47:49 AM (18 years ago)
Author:
dai_9181
Message:

CTypeDef → TypeDef
Houseクラスを追加。
オーバーロードレベルの種類を追加(レベル1に挿入)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Subroutine.cpp

    r75 r78  
    180180        GetVarType(fullCallName,type,false);
    181181
    182         extern ProcPointer **ppProcPointer;
    183         ProcPointer *pProcPtr = ppProcPointer[type.GetIndex()];
     182        ProcPointer *pProcPtr = House::procPointers[type.GetIndex()];
    184183        resultType = pProcPtr->ReturnType();
    185184
     
    768767///////////////////////
    769768
    770 int AddProcPtrInfo( char *buffer, DWORD dwProcType, int nowLine ){
     769int AddProcPtrInfo( const string &typeExpression, int nowLine ){
     770    DWORD dwProcType = (DWORD)typeExpression[2];
     771    const string &paramStr = typeExpression.substr( 3 );
    771772
    772773    Procedure::Kind kind = Procedure::Sub;
     
    778779
    779780    //buffer[0]は'('となっている
    780     pProcPointer->SetParamsAndReturnType( buffer, nowLine );
    781 
    782     extern ProcPointer **ppProcPointer;
    783     extern int ProcPtrInfoNum;
    784     ppProcPointer=(ProcPointer **)HeapReAlloc(hHeap,0,ppProcPointer,(ProcPtrInfoNum+1)*sizeof(ProcPointer *));
    785     ppProcPointer[ProcPtrInfoNum] = pProcPointer;
    786     ProcPtrInfoNum++;
    787 
    788     return ProcPtrInfoNum-1;
     781    pProcPointer->SetParamsAndReturnType( paramStr.c_str(), nowLine );
     782
     783    House::procPointers.push_back( pProcPointer );
     784
     785    return House::procPointers.size()-1;
    789786}
    790787void DeleteProcPtrInfo(void){
    791     extern ProcPointer **ppProcPointer;
    792     extern int ProcPtrInfoNum;
    793 
    794     for(int i=0;i<ProcPtrInfoNum;i++){
    795         delete ppProcPointer[i];
    796     }
    797 
    798     HeapDefaultFree(ppProcPointer);
    799 }
     788    BOOST_FOREACH( ProcPointer *pProcPointer, House::procPointers ){
     789        delete pProcPointer;
     790    }
     791
     792    House::procPointers.clear();
     793}
Note: See TracChangeset for help on using the changeset viewer.