Changeset 585 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/VtblGenerator.cpp
- Timestamp:
- May 10, 2008, 1:40:33 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/VtblGenerator.cpp
r559 r585 3 3 using namespace ActiveBasic::Compiler; 4 4 5 LONG_PTRVtblGenerator::GenerateVTablePart( const Methods &methods )5 int VtblGenerator::GenerateVTablePart( const Methods &methods ) 6 6 { 7 7 const UserProc **ppsi = (const UserProc **)malloc(methods.GetVtblNum()*sizeof(UserProc *)); … … 29 29 } 30 30 31 LONG_PTR vtableDataTableOffset = compiler.GetObjectModule().dataTable.AddBinary( (void *)ppsi, methods.GetVtblNum()*sizeof(LONG_PTR) );31 int vtableDataTableOffset = compiler.GetObjectModule().nativeSection.dataTable.AddBinary( (void *)ppsi, methods.GetVtblNum()*sizeof(LONG_PTR) ); 32 32 33 33 for( int i=0; i < methods.GetVtblNum(); i++ ) … … 61 61 62 62 // 自身のクラスのvtblを生成 63 LONG_PTRthisClassVtblOffset = GenerateVTablePart( _class.GetDynamicMethods() );63 int thisClassVtblOffset = GenerateVTablePart( _class.GetDynamicMethods() ); 64 64 _class.SetVtblOffset( thisClassVtblOffset ); 65 65 _class.vtblMasterList.push_back( thisClassVtblOffset ); … … 68 68 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() ) 69 69 { 70 LONG_PTRtempVtblOffset = GenerateVTablePart( pInterface->GetDynamicMethods() );70 int tempVtblOffset = GenerateVTablePart( pInterface->GetDynamicMethods() ); 71 71 _class.vtblMasterList.push_back( tempVtblOffset ); 72 72 … … 84 84 85 85 // vtblマスターリストを生成 86 int offset = compiler.GetObjectModule(). dataTable.AddBinary(86 int offset = compiler.GetObjectModule().nativeSection.dataTable.AddBinary( 87 87 (void *)&_class.vtblMasterList[0], 88 88 static_cast<int>(_class.vtblMasterList.size()*sizeof(LONG_PTR)) … … 119 119 // 自身のクラスのvtbl 120 120 { 121 LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule(). dataTable.GetPtr() + _class.GetVtblOffset());121 LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule().nativeSection.dataTable.GetPtr() + _class.GetVtblOffset()); 122 122 123 123 for( int i=0; i<_class.GetVtblNum(); i++ ){ … … 138 138 BOOST_FOREACH( const ::Interface *pInterface, _class.GetInterfaces() ) 139 139 { 140 LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule(). dataTable.GetPtr() + pInterface->GetVtblOffset());140 LONG_PTR *pVtbl = (LONG_PTR *)((char *)compiler.GetObjectModule().nativeSection.dataTable.GetPtr() + pInterface->GetVtblOffset()); 141 141 142 142 for( int i=0; i<pInterface->GetClass().GetVtblNum(); i++ ){ … … 155 155 156 156 // vtblマスターリスト 157 LONG_PTR *pVtblMasterList = (LONG_PTR *)((char *)compiler.GetObjectModule(). dataTable.GetPtr() + _class.GetVtblMasterListOffset() );157 LONG_PTR *pVtblMasterList = (LONG_PTR *)((char *)compiler.GetObjectModule().nativeSection.dataTable.GetPtr() + _class.GetVtblMasterListOffset() ); 158 158 for( int i=0; i<static_cast<int>(_class.vtblMasterList.size()); i++ ) 159 159 {
Note:
See TracChangeset
for help on using the changeset viewer.