Ignore:
Timestamp:
Jun 14, 2008, 12:16:27 PM (16 years ago)
Author:
dai_9181
Message:

静的リンクリンカの依存関係解決モジュールを製作中

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp

    r639 r640  
    1919}
    2020
    21 bool Schedule::Resolve( const ObjectModule &resolver )
     21bool Schedule::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors )
    2222{
    2323    switch( type )
     
    2626    case AddressOf:
    2727    case CatchAddress:
    28         if( pUserProc->IsNeedResolve() )
    29         {
    30             pUserProc = resolver.meta.GetUserProcs().FindLike( pUserProc );
     28        if( this->pUserProc->IsNeedResolve() )
     29        {
     30            const ::UserProc *pTempUserProc = resolver.meta.GetUserProcs().FindLike( this->pUserProc );
     31            if( pTempUserProc )
     32            {
     33                this->pUserProc = pTempUserProc;
     34            }
     35            else
     36            {
     37                resolveErrors.Add( ResolveError( this->pUserProc->GetRelationalObjectModuleIndex(), this->pUserProc->GetFullName() ) );
     38            }
    3139        }
    3240        break;
    3341    case DllProc:
    34         if( pDllProc->IsNeedResolve() )
    35         {
    36             pDllProc = resolver.meta.GetDllProcs().FindLike( pDllProc );
     42        if( this->pDllProc->IsNeedResolve() )
     43        {
     44            const ::DllProc *pTempDllProc = resolver.meta.GetDllProcs().FindLike( this->pDllProc );
     45            if( pTempDllProc )
     46            {
     47                this->pDllProc = pTempDllProc;
     48            }
     49            else
     50            {
     51                resolveErrors.Add( ResolveError( this->pDllProc->GetRelationalObjectModuleIndex(), this->pDllProc->GetFullName() ) );
     52            }
    3753        }
    3854        break;
     
    4056    case Vtbl:
    4157    case TypeInfo:
    42         if( pClass->IsNeedResolve() )
    43         {
    44             pClass = resolver.meta.GetClasses().FindLike( pClass );
     58        if( this->pClass->IsNeedResolve() )
     59        {
     60            const CClass *pTempClass = resolver.meta.GetClasses().FindLike( this->pClass );
     61            if( pTempClass )
     62            {
     63                this->pClass = pTempClass;
     64            }
     65            else
     66            {
     67                resolveErrors.Add( ResolveError( this->pClass->GetRelationalObjectModuleIndex(), this->pClass->GetFullName() ) );
     68            }
    4569        }
    4670        break;
     
    191215}
    192216
    193 void NativeCode::Resolve( const ObjectModule &resolver )
     217void NativeCode::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors )
    194218{
    195219    BOOST_FOREACH( Schedule &schedule, schedules )
    196220    {
    197         schedule.Resolve( resolver );
    198     }
    199 }
     221        schedule.Resolve( resolver, resolveErrors );
     222    }
     223}
Note: See TracChangeset for help on using the changeset viewer.