Changeset 559 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/src/Method.cpp
- Timestamp:
- May 5, 2008, 12:26:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/src/Method.cpp
r558 r559 36 36 { 37 37 // 静的メソッドがコピーコンストラトされることは想定しない 38 compiler.errorMessenger.OutputFatalError();38 throw; 39 39 } 40 40 … … 144 144 return count; 145 145 } 146 147 void Methods::GenerateVTablePart( long &vtableDataTableOffset ) const148 {149 const UserProc **ppsi = (const UserProc **)malloc(GetVtblNum()*sizeof(UserProc *));150 151 //関数テーブルに値をセット152 int i2 = 0;153 const Methods &methods = *this;154 BOOST_FOREACH( const CMethod *pMethod, methods ){155 if(pMethod->IsVirtual()){156 if( !pMethod->GetUserProc().IsUsing() )157 {158 //ts((char *)pMethod->GetUserProc().GetFullName().c_str());159 }160 pMethod->GetUserProc().Using();161 162 if(pMethod->IsAbstract()){163 compiler.errorMessenger.OutputFatalError();164 165 ppsi[i2]=0;166 }167 else{168 ppsi[i2]=&pMethod->GetUserProc();169 }170 i2++;171 }172 }173 174 vtableDataTableOffset = compiler.GetObjectModule().dataTable.AddBinary( (void *)ppsi, GetVtblNum()*sizeof(LONG_PTR) );175 176 for( int i=0; i < GetVtblNum(); i++ ){177 pobj_Reloc->AddSchedule_DataSection(static_cast<DWORD>(vtableDataTableOffset+i*sizeof(LONG_PTR)));178 }179 180 free(ppsi);181 }
Note:
See TracChangeset
for help on using the changeset viewer.