Changeset 345 in dev for trunk/abdev/BasicCompiler_Common


Ignore:
Timestamp:
Oct 10, 2007, 1:52:43 AM (17 years ago)
Author:
dai_9181
Message:

64ビット版でもインターフェイスのベース実装周りをコンパイルできるようにした(インターフェイス機構自体はまだ未完成)

Location:
trunk/abdev/BasicCompiler_Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/include/Class.h

    r344 r345  
    7575{
    7676    const CClass *pInterfaceClass;
    77     mutable int vtblOffset;
     77    mutable LONG_PTR vtblOffset;
    7878
    7979public:
     
    480480    long vtbl_offset;
    481481    long vtblMasterListOffset;
    482     std::vector<LONG_PTR> vtblMasterList;
     482    std::vector<long> vtblMasterList;
    483483public:
    484484    int GetVtblMasterListIndex( const UserProc *pUserProc ) const;
    485485    int GetFuncNumInVtbl( const UserProc *pUserProc ) const;
    486     LONG_PTR GetVtblMasterListOffset() const;
    487     void GenerateVTablePart( LONG_PTR &vtableDataTableOffset ) const;
    488     void GenerateVTableMasterList( const std::vector<LONG_PTR> &vtableMasterList, LONG_PTR &offset );
     486    long GetVtblMasterListOffset() const;
     487    void GenerateVTablePart( long &vtableDataTableOffset ) const;
     488    void GenerateVTableMasterList( const std::vector<long> &vtableMasterList, long &offset );
    489489    void GenerateFullVTables();
    490490    void ActionVtblSchedule( LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection, LONG_PTR MemPos_DataSection );
  • trunk/abdev/BasicCompiler_Common/src/Class.cpp

    r344 r345  
    826826    return n;
    827827}
    828 LONG_PTR CClass::GetVtblMasterListOffset() const
     828long CClass::GetVtblMasterListOffset() const
    829829{
    830830    //既に存在する場合はそれを返す
     
    836836    return vtblMasterListOffset;
    837837}
    838 void CClass::GenerateVTablePart( LONG_PTR &vtableDataTableOffset ) const
     838void CClass::GenerateVTablePart( long &vtableDataTableOffset ) const
    839839{
    840840    const UserProc **ppsi = (const UserProc **)malloc(GetVtblNum()*sizeof(UserProc *));
     
    866866
    867867    for( int i=0; i < GetVtblNum(); i++ ){
    868         pobj_Reloc->AddSchedule_DataSection(vtableDataTableOffset+i*sizeof(LONG_PTR));
     868        pobj_Reloc->AddSchedule_DataSection(static_cast<DWORD>(vtableDataTableOffset+i*sizeof(LONG_PTR)));
    869869    }
    870870
    871871    free(ppsi);
    872872}
    873 void CClass::GenerateVTableMasterList( const std::vector<LONG_PTR> &vtableMasterList, LONG_PTR &offset )
     873void CClass::GenerateVTableMasterList( const std::vector<long> &vtableMasterList, long &offset )
    874874{
    875875    offset = compiler.GetObjectModule().dataTable.AddBinary(
    876876        (void *)&vtableMasterList[0],
    877         vtableMasterList.size()*sizeof(LONG_PTR)
     877        static_cast<int>(vtableMasterList.size()*sizeof(LONG_PTR))
    878878    );
    879879}
     
    904904    BOOST_FOREACH( const ::Interface &objInterface, interfaces )
    905905    {
    906         LONG_PTR tempVtblOffset;
     906        long tempVtblOffset;
    907907        objInterface.GetClass().GenerateVTablePart( tempVtblOffset );
    908908        vtblMasterList.push_back( tempVtblOffset );
Note: See TracChangeset for help on using the changeset viewer.