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

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

Location:
trunk/ab5.0/abdev/ab_common/include
Files:
1 added
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h

    r639 r640  
    147147        return false;
    148148    }
     149    bool Equals( const CClass *pClass ) const
     150    {
     151        // ポインタが等しいかどうかを見てみる
     152        if( this == pClass )
     153        {
     154            return true;
     155        }
     156        else if( this->IsNeedResolve() || pClass->IsNeedResolve() )
     157        {
     158            // 依存関係解決前の状態であれば、パスが等しいかどうかを見てみる
     159            if( this->IsDuplication( pClass ) )
     160            {
     161                return true;
     162            }
     163        }
     164        return false;
     165    }
    149166
    150167    virtual void Using() const;
     
    466483    void GetReferenceOffsetsInitializeBuffer( std::string &referenceOffsetsBuffer, int &numOfReference, int baseOffset = 0 ) const;
    467484
    468     virtual bool Resolve( const ObjectModule &resolver );
     485    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    469486};
    470487
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h

    r639 r640  
    11#pragma once
    22
    3 //定数
     3//萔
    44class CConst
    55    : public RelationalObjectModuleItem
     
    99    _int64 i64data;
    1010
    11     // XMLシリアライズ用
     11    // XMLVACYp
    1212private:
    1313    friend class boost::serialization::access;
     
    6666    double GetDoubleData();
    6767
    68     virtual bool Resolve( const ObjectModule &resolver );
     68    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    6969};
    7070class Consts : public Jenga::Common::Hashmap<CConst>
    7171{
    72     // XMLシリアライズ用
     72    // XMLVACYp
    7373private:
    7474    friend class boost::serialization::access;
     
    9696};
    9797
    98 //定数マクロ
     98//萔}N
    9999class ConstMacro
    100100    : public RelationalObjectModuleItem
     
    104104    std::string expression;
    105105
    106     // XMLシリアライズ用
     106    // XMLVACYp
    107107private:
    108108    friend class boost::serialization::access;
     
    154154    }
    155155
    156     virtual bool Resolve( const ObjectModule &resolver );
     156    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    157157};
    158158class ConstMacros
    159159    : public Jenga::Common::Hashmap<ConstMacro>
    160160{
    161     // XMLシリアライズ用
     161    // XMLVACYp
    162162private:
    163163    friend class boost::serialization::access;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/DataTable.h

    r639 r640  
    150150    void ResetDataSectionBaseOffset( long dataSectionBaseOffset );
    151151
    152     void Resolve( const ObjectModule &resolver );
     152    void Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    153153};
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Delegate.h

    r639 r640  
    3333
    3434        ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
     35        ar & BOOST_SERIALIZATION_NVP( paramStr );
     36        ar & BOOST_SERIALIZATION_NVP( returnTypeName );
     37        ar & BOOST_SERIALIZATION_NVP( sourceIndex );
    3538        ar & BOOST_SERIALIZATION_NVP( dynamicParams );
    3639    }
     
    9295    bool IsSimilar( const Delegate &dgt ) const;
    9396
    94     virtual bool Resolve( const ObjectModule &resolver );
     97    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    9598};
    9699typedef Jenga::Common::Hashmap<Delegate> Delegates;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h

    r639 r640  
    9090    }
    9191
     92    bool Equals( const Interface *pInterface ) const;
     93
    9294    std::string GetFullNameWithActualGenericTypeParameters() const;
    9395
    94     virtual bool Resolve( const ObjectModule &resolver );
     96    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    9597};
    9698typedef std::vector<Interface *> Interfaces;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Member.h

    r639 r640  
    7777    }
    7878
    79     virtual bool Resolve( const ObjectModule &resolver );
     79    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    8080};
    8181typedef std::vector<Member *> Members;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h

    r639 r640  
    162162    const CClass *FindClassSupportedTypeDef( const Symbol &symbol );
    163163
    164     void Resolve( const ObjectModule &resolver );
     164    void Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    165165};
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Method.h

    r639 r640  
    4949    virtual void SetNotUseMark( bool isNotUse ) = 0;
    5050
    51     virtual bool Resolve( const ObjectModule &resolver );
     51    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    5252};
    5353
     
    159159    }
    160160
    161     virtual bool Resolve( const ObjectModule &resolver );
     161    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    162162};
    163163BOOST_CLASS_EXPORT( DynamicMethod );
     
    235235    }
    236236
    237     virtual bool Resolve( const ObjectModule &resolver );
     237    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    238238};
    239239BOOST_CLASS_EXPORT( StaticMethod );
  • trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h

    r639 r640  
    117117    const ::CClass &GetClass() const;
    118118
    119     virtual bool Resolve( const ObjectModule &resolver );
     119    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    120120};
    121121typedef std::vector<Schedule> Schedules;
     
    249249    void ResetRelationalObjectModuleIndex( const std::vector<int> &relationTable );
    250250
    251     void Resolve( const ObjectModule &resolver );
     251    void Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    252252};
  • trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h

    r637 r640  
    6565
    6666    // 依存関係の解決を行う
    67     void Resolve();
     67    void Resolve( ResolveErrors &resolveErrors );
    6868
    6969    // 下記の関連になるようなテーブルを取得する
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h

    r639 r640  
    111111    }
    112112
    113     virtual bool Resolve( const ObjectModule &resolver );
     113    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    114114};
    115115
     
    161161        ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
    162162        ar & boost::serialization::make_nvp("pParentClass", const_cast<CClass *&>(pParentClass) );
     163        ar & boost::serialization::make_nvp("pInterface", const_cast<Interface *&>(pInterface) );
    163164
    164165        if( ActiveBasic::Common::Environment::IsRemoveExternal() )
     
    173174        ar & BOOST_SERIALIZATION_NVP( _paramStr );
    174175        ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
    175         ar & boost::serialization::make_nvp("pInterface", const_cast<Interface *&>(pInterface) );
    176176        ar & BOOST_SERIALIZATION_NVP( pMethod );
    177177        ar & BOOST_SERIALIZATION_NVP( isMacro );
     
    209209    virtual bool IsDuplication( const UserProc *pUserProc ) const
    210210    {
    211         if( this->GetParentClassPtr() == pUserProc->GetParentClassPtr() // 親クラスが等しい
    212             && this->pInterface == pUserProc->pInterface                // インターフェイスが等しい
    213             && pUserProc->IsEqualSymbol( *this )                        // 名前空間及び名前が等しい
    214             && this->Params().Equals( pUserProc->Params() )             // パラメータが等しい
    215             && this->returnType.Equals( pUserProc->returnType ) )       // 戻り値が等しい
     211        bool isEqualParentClass =
     212            this->HasParentClass() && pUserProc->HasParentClass()
     213            ? this->GetParentClassPtr()->Equals( pUserProc->GetParentClassPtr() )
     214            : this->GetParentClassPtr() == pUserProc->GetParentClassPtr();
     215        bool isEqualInterface =
     216            this->pInterface && pUserProc->pInterface
     217            ? this->pInterface->Equals( pUserProc->pInterface )
     218            : this->pInterface == pUserProc->pInterface;
     219
     220        if( isEqualParentClass                                      // 親クラスが等しい
     221            && isEqualInterface                                     // インターフェイスが等しい
     222            && pUserProc->IsEqualSymbol( *this )                    // 名前空間及び名前が等しい
     223            && this->Params().Equals( pUserProc->Params() )         // パラメータが等しい
     224            && this->returnType.Equals( pUserProc->returnType ) )   // 戻り値が等しい
    216225        {
    217226            return true;
     
    376385    const CMethod &GetMethod() const;
    377386
    378     virtual bool Resolve( const ObjectModule &resolver );
     387    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    379388
    380389    static const UserProc *pGlobalProc;
     
    484493    }
    485494
    486     virtual bool Resolve( const ObjectModule &resolver );
     495    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    487496};
    488497class DllProcs : public Jenga::Common::Hashmap<DllProc>
     
    525534    }
    526535
    527     virtual bool Resolve( const ObjectModule &resolver );
     536    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    528537};
    529538
  • trunk/ab5.0/abdev/ab_common/include/Lexical/RelationalObjectModuleItem.h

    r639 r640  
    6868    }
    6969
    70     virtual bool Resolve( const ObjectModule &resolver ) = 0;
     70    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ) = 0;
    7171};
    7272
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Template.h

    r639 r640  
    4747    }
    4848
    49     virtual bool Resolve( const ObjectModule &resolver );
     49    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    5050};
    5151
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h

    r639 r640  
    230230    std::string ToString() const;
    231231
    232     virtual bool Resolve( const ObjectModule &resolver );
     232    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    233233
    234234
     
    311311{
    312312    Type basicType;
    313     CClass *pClass;
     313    const CClass *pClass;
    314314
    315315    // XMLシリアライズ用
     
    321321
    322322        ar & BOOST_SERIALIZATION_NVP( basicType );
    323         ar & BOOST_SERIALIZATION_NVP( pClass );
    324     }
    325 
    326 public:
    327     BlittableType( const Type &basicType, CClass *pClass )
     323        ar & boost::serialization::make_nvp("pClass", const_cast<CClass *&>(pClass) );
     324    }
     325
     326public:
     327    BlittableType( const Type &basicType, const CClass *pClass )
    328328        : basicType( basicType )
    329329        , pClass( pClass )
     
    342342    }
    343343    const std::string GetCreateStaticMethodFullName() const;
     344
     345    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    344346};
    345347class BlittableTypes : public std::vector<BlittableType>
  • trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h

    r639 r640  
    5151    }
    5252
    53     virtual bool Resolve( const ObjectModule &resolver );
     53    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    5454};
    5555
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Variable.h

    r639 r640  
    175175    }
    176176
    177     virtual bool Resolve( const ObjectModule &resolver );
     177    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    178178
    179179
  • trunk/ab5.0/abdev/ab_common/include/ab_common.h

    r637 r640  
    88#include "Lexical/NamespaceSupporter.h"
    99#include "Lexical/Symbol.h"
     10#include "Lexical/Resolver.h"
    1011#include "Lexical/RelationalObjectModuleItem.h"
    1112#include "Lexical/Prototype.h"
Note: See TracChangeset for help on using the changeset viewer.