[184] | 1 | #pragma once
|
---|
| 2 |
|
---|
[206] | 3 | #include <option.h>
|
---|
| 4 | #include <Program.h>
|
---|
| 5 | #include <Prototype.h>
|
---|
| 6 | #include <Method.h>
|
---|
| 7 | #include <Member.h>
|
---|
[266] | 8 | #include <Source.h>
|
---|
[184] | 9 |
|
---|
[206] | 10 | class UserProc;
|
---|
[290] | 11 | class CClass;
|
---|
[325] | 12 | class Delegate;
|
---|
[206] | 13 |
|
---|
[342] | 14 | class ClassPrototype : public Prototype
|
---|
[184] | 15 | {
|
---|
[342] | 16 | // 動的メソッド
|
---|
| 17 | Methods dynamicMethods;
|
---|
| 18 |
|
---|
| 19 | // XMLシリアライズ用
|
---|
| 20 | private:
|
---|
| 21 | friend class boost::serialization::access;
|
---|
| 22 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 23 | {
|
---|
| 24 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Prototype );
|
---|
| 25 | ar & BOOST_SERIALIZATION_NVP( dynamicMethods );
|
---|
| 26 | }
|
---|
| 27 |
|
---|
[184] | 28 | public:
|
---|
[342] | 29 | ClassPrototype( const NamespaceScopes &namespaceScopes, const string &name )
|
---|
| 30 | : Prototype( namespaceScopes, name )
|
---|
| 31 | {
|
---|
| 32 | }
|
---|
| 33 | ClassPrototype()
|
---|
| 34 | : Prototype()
|
---|
| 35 | {
|
---|
| 36 | }
|
---|
| 37 | const Methods &GetDynamicMethods() const
|
---|
| 38 | {
|
---|
| 39 | return dynamicMethods;
|
---|
| 40 | }
|
---|
| 41 | Methods &GetDynamicMethods()
|
---|
| 42 | {
|
---|
| 43 | return dynamicMethods;
|
---|
| 44 | }
|
---|
| 45 | };
|
---|
| 46 |
|
---|
| 47 | class Interface : public ClassPrototype
|
---|
| 48 | {
|
---|
| 49 | const CClass *pInterfaceClass;
|
---|
| 50 | mutable int vtblOffset;
|
---|
| 51 | public:
|
---|
[343] | 52 | Interface( const CClass *pInterfaceClass );
|
---|
[206] | 53 |
|
---|
[342] | 54 | const CClass &GetClass() const{
|
---|
[206] | 55 | return *pInterfaceClass;
|
---|
| 56 | }
|
---|
[342] | 57 | LONG_PTR GetVtblOffset() const
|
---|
[191] | 58 | {
|
---|
[206] | 59 | return vtblOffset;
|
---|
[191] | 60 | }
|
---|
[342] | 61 | void SetVtblOffset( LONG_PTR vtblOffset ) const
|
---|
| 62 | {
|
---|
| 63 | this->vtblOffset = vtblOffset;
|
---|
| 64 | }
|
---|
[206] | 65 | };
|
---|
[342] | 66 | typedef std::vector<Interface> Interfaces;
|
---|
[184] | 67 |
|
---|
[342] | 68 | class CClass: public ClassPrototype, public Jenga::Common::ObjectInHashmap<CClass>
|
---|
[206] | 69 | {
|
---|
| 70 | public:
|
---|
| 71 | // 型の種類
|
---|
| 72 | enum ClassType{
|
---|
| 73 | Class,
|
---|
| 74 | Interface,
|
---|
| 75 | Enum,
|
---|
| 76 | Delegate,
|
---|
| 77 | Structure,
|
---|
| 78 | };
|
---|
[193] | 79 |
|
---|
[206] | 80 | private:
|
---|
| 81 | ClassType classType;
|
---|
[184] | 82 |
|
---|
[206] | 83 | // importされている名前空間
|
---|
| 84 | NamespaceScopesCollection importedNamespaces;
|
---|
[290] | 85 |
|
---|
| 86 | // 型パラメータ
|
---|
| 87 | GenericTypes formalGenericTypes;
|
---|
| 88 |
|
---|
[206] | 89 | // 継承クラス
|
---|
| 90 | const CClass *pSuperClass;
|
---|
[184] | 91 |
|
---|
[299] | 92 | // 継承クラスの型パラメータ(実パラメータ)
|
---|
| 93 | Types superClassActualTypeParameters;
|
---|
| 94 |
|
---|
[206] | 95 | // Blittable型情報
|
---|
| 96 | Type blittableType;
|
---|
[184] | 97 |
|
---|
[206] | 98 | // 実装するインターフェイス
|
---|
| 99 | Interfaces interfaces;
|
---|
[191] | 100 |
|
---|
[206] | 101 | // 動的メンバ
|
---|
| 102 | Members dynamicMembers;
|
---|
[191] | 103 |
|
---|
[206] | 104 | // 静的メンバ
|
---|
| 105 | Members staticMembers;
|
---|
| 106 |
|
---|
| 107 | // 動的メソッド
|
---|
| 108 | int ConstructorMemberSubIndex;
|
---|
| 109 | int DestructorMemberSubIndex;
|
---|
| 110 | int vtblNum; // 仮想関数の数
|
---|
| 111 |
|
---|
| 112 | // 静的メソッド
|
---|
| 113 | Methods staticMethods;
|
---|
| 114 |
|
---|
[232] | 115 | //アラインメント値
|
---|
| 116 | int fixedAlignment;
|
---|
| 117 |
|
---|
[191] | 118 | // XMLシリアライズ用
|
---|
[208] | 119 | // TODO: xml未完成
|
---|
[191] | 120 | private:
|
---|
| 121 | friend class boost::serialization::access;
|
---|
| 122 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 123 | {
|
---|
[206] | 124 | trace_for_serialize( "serializing - CClass" );
|
---|
| 125 |
|
---|
[342] | 126 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( ClassPrototype );
|
---|
[206] | 127 | ar & BOOST_SERIALIZATION_NVP( classType );
|
---|
| 128 | ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
|
---|
[293] | 129 | ar & BOOST_SERIALIZATION_NVP( formalGenericTypes );
|
---|
[206] | 130 | ar & boost::serialization::make_nvp( "pSuperClass", const_cast<CClass *&>(pSuperClass) );
|
---|
[299] | 131 | ar & BOOST_SERIALIZATION_NVP( superClassActualTypeParameters );
|
---|
[206] | 132 | ar & BOOST_SERIALIZATION_NVP( blittableType );
|
---|
| 133 | //ar & BOOST_SERIALIZATION_NVP( interfaces );
|
---|
| 134 | ar & BOOST_SERIALIZATION_NVP( dynamicMembers );
|
---|
| 135 | ar & BOOST_SERIALIZATION_NVP( staticMembers );
|
---|
| 136 | ar & BOOST_SERIALIZATION_NVP( ConstructorMemberSubIndex );
|
---|
| 137 | ar & BOOST_SERIALIZATION_NVP( DestructorMemberSubIndex );
|
---|
| 138 | ar & BOOST_SERIALIZATION_NVP( vtblNum );
|
---|
| 139 | ar & BOOST_SERIALIZATION_NVP( staticMethods );
|
---|
[232] | 140 | ar & BOOST_SERIALIZATION_NVP( fixedAlignment );
|
---|
[191] | 141 | }
|
---|
[184] | 142 |
|
---|
[206] | 143 | bool isReady;
|
---|
[184] | 144 | public:
|
---|
[206] | 145 |
|
---|
| 146 | CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name )
|
---|
[342] | 147 | : ClassPrototype( namespaceScopes, name )
|
---|
[206] | 148 | , importedNamespaces( importedNamespaces )
|
---|
| 149 | , classType( Class )
|
---|
| 150 | , pSuperClass( NULL )
|
---|
[290] | 151 | , blittableType( Type() )
|
---|
[206] | 152 | , isReady( false )
|
---|
[232] | 153 | , fixedAlignment( 0 )
|
---|
[206] | 154 | , ConstructorMemberSubIndex( -1 )
|
---|
| 155 | , DestructorMemberSubIndex( -1 )
|
---|
| 156 | , vtblNum( 0 )
|
---|
| 157 | , vtbl_offset( -1 )
|
---|
| 158 | , isCompilingConstructor( false )
|
---|
| 159 | , isCompilingDestructor( false )
|
---|
| 160 | , pobj_NextClass( NULL )
|
---|
[191] | 161 | {
|
---|
| 162 | }
|
---|
[206] | 163 | CClass()
|
---|
[342] | 164 | : ClassPrototype()
|
---|
[206] | 165 | , importedNamespaces()
|
---|
| 166 | , classType()
|
---|
| 167 | , pSuperClass( NULL )
|
---|
[290] | 168 | , blittableType( Type() )
|
---|
[206] | 169 | , isReady( false )
|
---|
[232] | 170 | , fixedAlignment( 0 )
|
---|
[206] | 171 | , ConstructorMemberSubIndex( -1 )
|
---|
| 172 | , DestructorMemberSubIndex( -1 )
|
---|
| 173 | , vtblNum( 0 )
|
---|
| 174 | , vtbl_offset( -1 )
|
---|
| 175 | , isCompilingConstructor( false )
|
---|
| 176 | , isCompilingDestructor( false )
|
---|
| 177 | , pobj_NextClass( NULL )
|
---|
| 178 | {
|
---|
| 179 | }
|
---|
| 180 | ~CClass()
|
---|
| 181 | {
|
---|
| 182 | // 動的メンバ
|
---|
| 183 | BOOST_FOREACH( CMember *member, dynamicMembers ){
|
---|
| 184 | delete member;
|
---|
| 185 | }
|
---|
[191] | 186 |
|
---|
[206] | 187 | // 静的メンバ
|
---|
| 188 | BOOST_FOREACH( CMember *member, staticMembers ){
|
---|
| 189 | delete member;
|
---|
| 190 | }
|
---|
| 191 | }
|
---|
[184] | 192 |
|
---|
[270] | 193 | virtual const std::string &GetKeyName() const
|
---|
| 194 | {
|
---|
| 195 | return GetName();
|
---|
| 196 | }
|
---|
| 197 | virtual bool IsDuplication( const CClass *pClass ) const
|
---|
| 198 | {
|
---|
| 199 | if( pClass->IsEqualSymbol( *this ) )
|
---|
| 200 | {
|
---|
| 201 | return true;
|
---|
| 202 | }
|
---|
| 203 | return false;
|
---|
| 204 | }
|
---|
| 205 |
|
---|
[206] | 206 | void Readed(){
|
---|
| 207 | isReady = true;
|
---|
| 208 | }
|
---|
| 209 | bool IsReady() const{
|
---|
| 210 | return isReady;
|
---|
| 211 | }
|
---|
[184] | 212 |
|
---|
[206] | 213 | const NamespaceScopesCollection &GetImportedNamespaces() const
|
---|
| 214 | {
|
---|
| 215 | return importedNamespaces;
|
---|
| 216 | }
|
---|
| 217 |
|
---|
[290] | 218 | // 型パラメータ
|
---|
| 219 | void AddFormalGenericType( GenericType genericType )
|
---|
| 220 | {
|
---|
| 221 | this->formalGenericTypes.push_back( genericType );
|
---|
| 222 | }
|
---|
[299] | 223 | int GetFormalGenericTypeParameterIndex( const std::string &name ) const
|
---|
| 224 | {
|
---|
| 225 | int i = 0;
|
---|
| 226 | BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
|
---|
| 227 | {
|
---|
| 228 | if( genericType.GetName() == name )
|
---|
| 229 | {
|
---|
| 230 | return i;
|
---|
| 231 | }
|
---|
| 232 | i++;
|
---|
| 233 | }
|
---|
| 234 | return -1;
|
---|
| 235 | }
|
---|
[290] | 236 | bool IsExistFormalGenericTypeParameter( const std::string &name ) const
|
---|
| 237 | {
|
---|
| 238 | BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
|
---|
| 239 | {
|
---|
| 240 | if( genericType.GetName() == name )
|
---|
| 241 | {
|
---|
| 242 | return true;
|
---|
| 243 | }
|
---|
| 244 | }
|
---|
| 245 | return false;
|
---|
| 246 | }
|
---|
| 247 |
|
---|
[206] | 248 | // 継承元クラス
|
---|
| 249 | bool HasSuperClass() const
|
---|
| 250 | {
|
---|
| 251 | return ( pSuperClass != NULL );
|
---|
| 252 | }
|
---|
| 253 | const CClass &GetSuperClass() const
|
---|
| 254 | {
|
---|
| 255 | return *pSuperClass;
|
---|
| 256 | }
|
---|
| 257 | void SetSuperClass( const CClass *pSuperClass )
|
---|
| 258 | {
|
---|
| 259 | this->pSuperClass = pSuperClass;
|
---|
| 260 | }
|
---|
[299] | 261 | const Types &GetSuperClassActualTypeParameters() const
|
---|
| 262 | {
|
---|
| 263 | return superClassActualTypeParameters;
|
---|
| 264 | }
|
---|
| 265 | void SetSuperClassActualTypeParameters( const Types &actualTypeParameters )
|
---|
| 266 | {
|
---|
| 267 | this->superClassActualTypeParameters = actualTypeParameters;
|
---|
| 268 | }
|
---|
[206] | 269 |
|
---|
| 270 | // Blittable型
|
---|
| 271 | bool IsBlittableType() const
|
---|
| 272 | {
|
---|
| 273 | return !blittableType.IsNull();
|
---|
| 274 | }
|
---|
| 275 | const Type &GetBlittableType() const
|
---|
| 276 | {
|
---|
| 277 | return blittableType;
|
---|
| 278 | }
|
---|
| 279 | void SetBlittableType( const Type &type ){
|
---|
| 280 | blittableType = type;
|
---|
| 281 | }
|
---|
| 282 |
|
---|
| 283 | bool IsClass() const;
|
---|
| 284 | bool IsInterface() const;
|
---|
| 285 | bool IsEnum() const;
|
---|
| 286 | bool IsDelegate() const;
|
---|
| 287 | bool IsStructure() const;
|
---|
| 288 | void SetClassType( ClassType classType )
|
---|
| 289 | {
|
---|
| 290 | this->classType = classType;
|
---|
| 291 | }
|
---|
| 292 |
|
---|
| 293 |
|
---|
| 294 | //コンストラクタをコンパイルしているかどうかのチェックフラグ
|
---|
[184] | 295 | private:
|
---|
[206] | 296 | mutable bool isCompilingConstructor;
|
---|
[184] | 297 | public:
|
---|
[206] | 298 | void NotifyStartConstructorCompile() const;
|
---|
| 299 | void NotifyFinishConstructorCompile() const;
|
---|
| 300 | bool IsCompilingConstructor() const;
|
---|
[184] | 301 |
|
---|
[206] | 302 | //デストラクタをコンパイルしているかどうかのチェックフラグ
|
---|
| 303 | private:
|
---|
| 304 | mutable bool isCompilingDestructor;
|
---|
| 305 | public:
|
---|
| 306 | void NotifyStartDestructorCompile() const;
|
---|
| 307 | void NotifyFinishDestructorCompile() const;
|
---|
| 308 | bool IsCompilingDestructor() const;
|
---|
[191] | 309 |
|
---|
[193] | 310 |
|
---|
[206] | 311 | //自身の派生クラスかどうかを確認
|
---|
| 312 | bool IsSubClass( const CClass *pClass ) const;
|
---|
| 313 |
|
---|
| 314 | //自身と等しいまたは派生クラスかどうかを確認
|
---|
| 315 | bool IsEqualsOrSubClass( const CClass *pClass ) const;
|
---|
| 316 |
|
---|
| 317 | // 自身と等しいまたは派生クラス、基底クラスかどうかを確認
|
---|
| 318 | bool IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const;
|
---|
| 319 |
|
---|
| 320 | // インターフェイス
|
---|
| 321 | bool HasInterfaces() const
|
---|
| 322 | {
|
---|
| 323 | return ( interfaces.size() != 0 );
|
---|
| 324 | }
|
---|
[342] | 325 | const Interfaces &GetInterfaces() const
|
---|
| 326 | {
|
---|
| 327 | return interfaces;
|
---|
| 328 | }
|
---|
[206] | 329 | bool IsInheritsInterface( const CClass *pInterfaceClass ) const;
|
---|
| 330 |
|
---|
[340] | 331 | // クラス継承
|
---|
[206] | 332 | bool Inherits( const char *inheritNames, int nowLine );
|
---|
[299] | 333 | bool InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine );
|
---|
[206] | 334 | bool InheritsInterface( const CClass &inheritsClass, int nowLine );
|
---|
| 335 |
|
---|
[340] | 336 | // インターフェイス実装
|
---|
[342] | 337 | bool Implements( const CClass &interfaceClass, int nowLine );
|
---|
[340] | 338 | bool Implements( const char *interfaceNames, int nowLine );
|
---|
| 339 |
|
---|
[206] | 340 | //メンバ、メソッドの追加
|
---|
| 341 | CMember *CreateMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine );
|
---|
| 342 | void AddMember( Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer, int nowLine );
|
---|
| 343 | void AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine );
|
---|
| 344 |
|
---|
| 345 | void AddMethod(CClass *pobj_c, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
|
---|
| 346 | bool isVirtual, bool isOverride, char *buffer, int nowLine);
|
---|
| 347 |
|
---|
| 348 | //重複チェック
|
---|
| 349 | bool DupliCheckAll(const char *name);
|
---|
| 350 | bool DupliCheckMember(const char *name);
|
---|
| 351 |
|
---|
| 352 | const Members &GetDynamicMembers() const
|
---|
| 353 | {
|
---|
| 354 | return dynamicMembers;
|
---|
| 355 | }
|
---|
| 356 | const Members &GetStaticMembers() const
|
---|
| 357 | {
|
---|
| 358 | return staticMembers;
|
---|
| 359 | }
|
---|
| 360 | Members &GetDynamicMembers()
|
---|
| 361 | {
|
---|
| 362 | return dynamicMembers;
|
---|
| 363 | }
|
---|
| 364 | Members &GetStaticMembers()
|
---|
| 365 | {
|
---|
| 366 | return staticMembers;
|
---|
| 367 | }
|
---|
| 368 |
|
---|
| 369 | const Methods &GetStaticMethods() const
|
---|
| 370 | {
|
---|
| 371 | return staticMethods;
|
---|
| 372 | }
|
---|
| 373 | Methods &GetStaticMethods()
|
---|
| 374 | {
|
---|
| 375 | return staticMethods;
|
---|
| 376 | }
|
---|
| 377 |
|
---|
| 378 | //デフォルト コンストラクタ
|
---|
| 379 | const CMethod *GetConstructorMethod() const
|
---|
| 380 | {
|
---|
| 381 | if( ConstructorMemberSubIndex == -1 ) return NULL;
|
---|
[342] | 382 | return GetDynamicMethods()[ConstructorMemberSubIndex];
|
---|
[206] | 383 | }
|
---|
| 384 | void SetConstructorMemberSubIndex( int constructorMemberSubIndex )
|
---|
| 385 | {
|
---|
| 386 | this->ConstructorMemberSubIndex = constructorMemberSubIndex;
|
---|
| 387 | }
|
---|
| 388 |
|
---|
| 389 | //デストラクタ メソッドを取得
|
---|
| 390 | const CMethod *GetDestructorMethod() const
|
---|
| 391 | {
|
---|
| 392 | if( DestructorMemberSubIndex == -1 ) return NULL;
|
---|
[342] | 393 | return GetDynamicMethods()[DestructorMemberSubIndex];
|
---|
[206] | 394 | }
|
---|
| 395 | void SetDestructorMemberSubIndex( int destructorMemberSubIndex )
|
---|
| 396 | {
|
---|
| 397 | this->DestructorMemberSubIndex = destructorMemberSubIndex;
|
---|
| 398 | }
|
---|
| 399 |
|
---|
[325] | 400 | // デリゲート情報を取得
|
---|
| 401 | const ::Delegate &GetDelegate() const;
|
---|
| 402 |
|
---|
[232] | 403 | // ユーザ指定のアラインメント固定値
|
---|
| 404 | int GetFixedAlignment() const
|
---|
| 405 | {
|
---|
| 406 | return fixedAlignment;
|
---|
| 407 | }
|
---|
| 408 | void SetFixedAlignment( int fixedAlignment )
|
---|
| 409 | {
|
---|
| 410 | this->fixedAlignment = fixedAlignment;
|
---|
| 411 | }
|
---|
| 412 |
|
---|
[206] | 413 | // メンバの総合サイズを取得
|
---|
| 414 | int GetSize() const;
|
---|
| 415 |
|
---|
| 416 | // メンバのオフセットを取得
|
---|
| 417 | int GetMemberOffset( const char *memberName, int *pMemberNum = NULL ) const;
|
---|
| 418 | private:
|
---|
| 419 | // アラインメント値を取得
|
---|
| 420 | int GetAlignment() const;
|
---|
| 421 |
|
---|
[342] | 422 |
|
---|
| 423 | /////////////////////////////////////////////////////////////////
|
---|
| 424 | // vtbl
|
---|
| 425 | /////////////////////////////////////////////////////////////////
|
---|
[206] | 426 | public:
|
---|
[342] | 427 | // vtblに存在する仮想関数の数
|
---|
| 428 | int GetVtblNum() const
|
---|
| 429 | {
|
---|
| 430 | return vtblNum;
|
---|
| 431 | }
|
---|
| 432 | void SetVtblNum( int vtblNum )
|
---|
| 433 | {
|
---|
| 434 | this->vtblNum = vtblNum;
|
---|
| 435 | }
|
---|
| 436 | void AddVtblNum( int vtblNum )
|
---|
| 437 | {
|
---|
| 438 | this->vtblNum += vtblNum;
|
---|
| 439 | }
|
---|
| 440 | bool IsExistVirtualFunctions() const
|
---|
| 441 | {
|
---|
| 442 | return ( vtblNum > 0 );
|
---|
| 443 | }
|
---|
| 444 |
|
---|
| 445 | private:
|
---|
| 446 | long vtbl_offset;
|
---|
| 447 | long vtblMasterListOffset;
|
---|
| 448 | std::vector<LONG_PTR> vtblMasterList;
|
---|
| 449 | public:
|
---|
| 450 | int GetVtblMasterListIndex( const UserProc *pUserProc ) const;
|
---|
[206] | 451 | int GetFuncNumInVtbl( const UserProc *pUserProc ) const;
|
---|
[342] | 452 | LONG_PTR GetVtblMasterListOffset() const;
|
---|
| 453 | void GenerateVTablePart( LONG_PTR &vtableDataTableOffset ) const;
|
---|
| 454 | void GenerateVTableMasterList( const std::vector<LONG_PTR> &vtableMasterList, LONG_PTR &offset );
|
---|
| 455 | void GenerateFullVTables();
|
---|
| 456 | void ActionVtblSchedule( LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection, LONG_PTR MemPos_DataSection );
|
---|
[206] | 457 | bool IsAbstract() const;
|
---|
| 458 |
|
---|
| 459 |
|
---|
| 460 | //線形リスト用
|
---|
| 461 | CClass *pobj_NextClass;
|
---|
| 462 | };
|
---|
| 463 |
|
---|
[270] | 464 | class Classes : public Jenga::Common::Hashmap<CClass>
|
---|
[206] | 465 | {
|
---|
[191] | 466 | // XMLシリアライズ用
|
---|
[206] | 467 | public:
|
---|
| 468 | Classes()
|
---|
| 469 | : pCompilingMethod( NULL )
|
---|
| 470 | , pStringClass( NULL )
|
---|
| 471 | , pObjectClass( NULL )
|
---|
| 472 | {
|
---|
| 473 | }
|
---|
| 474 | ~Classes()
|
---|
| 475 | {
|
---|
| 476 | }
|
---|
| 477 |
|
---|
| 478 | virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name);
|
---|
| 479 | bool Insert( CClass *pClass );
|
---|
| 480 | CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
|
---|
| 481 | virtual void CollectClassesForNameOnly( const BasicSource &source );
|
---|
| 482 |
|
---|
[342] | 483 | // vtblを一時的に生成
|
---|
[282] | 484 | void GenerateVTables();
|
---|
[206] | 485 |
|
---|
[342] | 486 | // vtblのを正規のオフセットで再構築
|
---|
| 487 | void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection, LONG_PTR MemPos_DataSection );
|
---|
| 488 |
|
---|
[206] | 489 | virtual void InitStaticMember();
|
---|
| 490 |
|
---|
| 491 | private:
|
---|
| 492 | bool MemberVar_LoopRefCheck(const CClass &objClass);
|
---|
| 493 | public:
|
---|
| 494 | virtual void GetClass_recur(const char *lpszInheritsClass);
|
---|
| 495 | virtual void GetAllClassInfo();
|
---|
| 496 | virtual void Compile_System_InitializeUserTypes();
|
---|
| 497 |
|
---|
| 498 | const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const;
|
---|
| 499 | const CClass *Find( const string &fullName ) const;
|
---|
| 500 |
|
---|
| 501 |
|
---|
| 502 | /////////////////////////////
|
---|
| 503 | // 現在コンパイル中の情報
|
---|
| 504 | /////////////////////////////
|
---|
| 505 | private:
|
---|
| 506 | const CMethod *pCompilingMethod;
|
---|
| 507 | public:
|
---|
| 508 | void StartCompile( const UserProc *pUserProc );
|
---|
| 509 |
|
---|
| 510 | //現在コンパイル中のメソッド情報を取得
|
---|
| 511 | const CMethod *GetNowCompilingMethodInfo(){
|
---|
| 512 | return pCompilingMethod;
|
---|
| 513 | }
|
---|
| 514 |
|
---|
| 515 |
|
---|
| 516 | /////////////////////////////
|
---|
| 517 | // 特殊クラス
|
---|
| 518 | /////////////////////////////
|
---|
[272] | 519 | mutable const CClass *pStringClass;
|
---|
| 520 | mutable const CClass *pObjectClass;
|
---|
| 521 | const CClass *GetStringClassPtr() const;
|
---|
| 522 | const CClass *GetObjectClassPtr() const;
|
---|
[184] | 523 | };
|
---|