Changeset 345 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Oct 10, 2007, 1:52:43 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/Class.h
r344 r345 75 75 { 76 76 const CClass *pInterfaceClass; 77 mutable intvtblOffset;77 mutable LONG_PTR vtblOffset; 78 78 79 79 public: … … 480 480 long vtbl_offset; 481 481 long vtblMasterListOffset; 482 std::vector< LONG_PTR> vtblMasterList;482 std::vector<long> vtblMasterList; 483 483 public: 484 484 int GetVtblMasterListIndex( const UserProc *pUserProc ) const; 485 485 int GetFuncNumInVtbl( const UserProc *pUserProc ) const; 486 LONG_PTRGetVtblMasterListOffset() 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 ); 489 489 void GenerateFullVTables(); 490 490 void ActionVtblSchedule( LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection, LONG_PTR MemPos_DataSection ); -
trunk/abdev/BasicCompiler_Common/src/Class.cpp
r344 r345 826 826 return n; 827 827 } 828 LONG_PTRCClass::GetVtblMasterListOffset() const828 long CClass::GetVtblMasterListOffset() const 829 829 { 830 830 //既に存在する場合はそれを返す … … 836 836 return vtblMasterListOffset; 837 837 } 838 void CClass::GenerateVTablePart( LONG_PTR&vtableDataTableOffset ) const838 void CClass::GenerateVTablePart( long &vtableDataTableOffset ) const 839 839 { 840 840 const UserProc **ppsi = (const UserProc **)malloc(GetVtblNum()*sizeof(UserProc *)); … … 866 866 867 867 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))); 869 869 } 870 870 871 871 free(ppsi); 872 872 } 873 void CClass::GenerateVTableMasterList( const std::vector< LONG_PTR> &vtableMasterList, LONG_PTR&offset )873 void CClass::GenerateVTableMasterList( const std::vector<long> &vtableMasterList, long &offset ) 874 874 { 875 875 offset = compiler.GetObjectModule().dataTable.AddBinary( 876 876 (void *)&vtableMasterList[0], 877 vtableMasterList.size()*sizeof(LONG_PTR)877 static_cast<int>(vtableMasterList.size()*sizeof(LONG_PTR)) 878 878 ); 879 879 } … … 904 904 BOOST_FOREACH( const ::Interface &objInterface, interfaces ) 905 905 { 906 LONG_PTRtempVtblOffset;906 long tempVtblOffset; 907 907 objInterface.GetClass().GenerateVTablePart( tempVtblOffset ); 908 908 vtblMasterList.push_back( tempVtblOffset );
Note:
See TracChangeset
for help on using the changeset viewer.