Changeset 355 in dev for trunk/abdev/BasicCompiler_Common/include
- Timestamp:
- Nov 2, 2007, 2:53:56 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/include
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/Class.h
r353 r355 422 422 return staticMembers; 423 423 } 424 425 const CMember *FindDynamicMember( const char *memberName ) const 426 { 427 BOOST_FOREACH( CMember *pMember, GetDynamicMembers() ) 428 { 429 if( pMember->GetName() == memberName ) 430 { 431 return pMember; 432 } 433 } 434 return NULL; 435 } 424 436 425 437 void EnumDynamicMethodsOrInterfaceMethods( const char *methodName, std::vector<const UserProc *> &subs ) const; … … 516 528 517 529 530 // TypeInfo用 531 mutable int typeInfoDataTableOffset; 532 void SetTypeInfoDataTableOffset( int typeInfoDataTableOffset ) const 533 { 534 this->typeInfoDataTableOffset = typeInfoDataTableOffset; 535 } 536 int GetTypeInfoDataTableOffset() const 537 { 538 return typeInfoDataTableOffset; 539 } 540 541 518 542 //線形リスト用 519 543 CClass *pobj_NextClass; … … 554 578 virtual void GetAllClassInfo(); 555 579 virtual void Compile_System_InitializeUserTypes(); 580 virtual void Compile_System_InitializeUserTypesForBaseType(); 556 581 557 582 const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const; -
trunk/abdev/BasicCompiler_Common/include/DataTable.h
r279 r355 4 4 5 5 //DataTable.cpp 6 class DataTable{ 6 class DataTable 7 { 7 8 char *buffer; 8 9 int size; 9 10 10 void Realloc( int size ) 11 { 12 this->buffer = (char *)realloc( this->buffer, size + 100 ); 13 this->size = size; 14 } 11 public: 12 // リンカで解決しなければならないスケジュール 13 Schedules schedules; 15 14 16 15 // XMLシリアライズ用 … … 23 22 ar & BOOST_SERIALIZATION_NVP( _buffer ); 24 23 ar & BOOST_SERIALIZATION_NVP( size ); 24 ar & BOOST_SERIALIZATION_NVP( schedules ); 25 25 26 26 // 読み込み後の処理 … … 52 52 ar & BOOST_SERIALIZATION_NVP( _buffer ); 53 53 ar & BOOST_SERIALIZATION_NVP( size ); 54 ar & BOOST_SERIALIZATION_NVP( schedules ); 55 } 56 57 58 void Realloc( int size ) 59 { 60 this->buffer = (char *)realloc( this->buffer, size + 100 ); 61 this->size = size; 54 62 } 55 63 … … 92 100 void Add( const DataTable &dataTable ) 93 101 { 102 long baseOffset = GetSize(); 103 94 104 AddBinary( dataTable.GetPtr(), dataTable.GetSize() ); 105 106 // スケジュールを追加 107 BOOST_FOREACH( const Schedule &schedule, dataTable.schedules ) 108 { 109 this->schedules.push_back( 110 Schedule( 111 schedule.GetType(), 112 baseOffset + schedule.GetOffset(), 113 schedule.GetLongPtrValue() 114 ) 115 ); 116 } 95 117 } 96 118 97 const void *GetPtr() const; 98 int GetSize() const; 119 const void *GetPtr() const 120 { 121 return buffer; 122 } 123 int GetSize() const 124 { 125 return size; 126 } 127 128 long GetLong( int pos ) const 129 { 130 return *(long *)( buffer + pos ); 131 } 132 _int64 GetInt64( int pos ) const 133 { 134 return *(_int64 *)( buffer + pos ); 135 } 136 void Overwrite( int pos, long newLongValue ) 137 { 138 *(long *)( buffer + pos ) = newLongValue; 139 } 140 void OverwriteInt64( int pos, _int64 new64Value ) 141 { 142 *(_int64 *)( buffer + pos ) = new64Value; 143 } 144 145 bool MakeConstObjectToProcessStaticBuffer( const CClass &objClass, const Jenga::Common::Strings &initMemberValues, int &dataTableOffset ); 146 bool MakeConstObjectToProcessStaticBuffer( const char *expression, Type &resultType, int &dataTableOffset ); 147 int MakeConstStringObjectToProcessStaticBuffer( const char *str ); 148 bool MakeLiteralArrayBuffer( const char *expression, const Type &baseType, int &dataTableOffset ); 149 150 private: 151 int lastMadeConstObjectDataTableOffset; 152 public: 153 int GetLastMadeConstObjectDataTableOffset() 154 { 155 return lastMadeConstObjectDataTableOffset; 156 } 157 158 void ResetDataSectionBaseOffset( long dataSectionBaseOffset ); 99 159 }; -
trunk/abdev/BasicCompiler_Common/include/Linker.h
r282 r355 4 4 { 5 5 NativeCode nativeCode; 6 DataTable dataTable; 6 7 DWORD imageBase; 7 8 … … 15 16 { 16 17 return nativeCode; 18 } 19 20 const DataTable &GetDataTable() const 21 { 22 return dataTable; 17 23 } 18 24 … … 37 43 void ResolveVtblSchedule( long dataSectionBaseOffset ); 38 44 45 // TypeInfoスケジュール 46 void ResolveTypeInfoSchedule( long dataSectionBaseOffset ); 47 39 48 // リンク 40 49 void Link( ObjectModule &masterObjectModule ); 50 51 // データテーブルをセット 52 void SetDataTable( DataTable &dataTable ); 41 53 }; -
trunk/abdev/BasicCompiler_Common/include/NamespaceSupporter.h
r215 r355 53 53 54 54 while( tempLivingNamespaceScopes.size() ){ 55 NamespaceScopes tempNamespaceScopes = tempLivingNamespaceScopes; 56 57 string tempStr = tempNamespaceScopes.ToString() + "." + entryName; 55 string tempStr = tempLivingNamespaceScopes.ToString() + "." + entryName; 58 56 if( thisStr == tempStr ){ 59 57 return true; -
trunk/abdev/BasicCompiler_Common/include/NativeCode.h
r287 r355 24 24 DllProc, // DLL関数位置スケジュール 25 25 Vtbl, // vtblスケジュール 26 TypeInfo, // TypeInfoスケジュール 26 27 }; 27 28 … … 57 58 break; 58 59 case Vtbl: 60 case TypeInfo: 59 61 ar & boost::serialization::make_nvp("pClass", const_cast<::CClass *&>(pClass)); 60 62 break; … … 93 95 { 94 96 } 97 Schedule( Type type, const ::CClass *pClass, long offset ) 98 : type( type ) 99 , pClass( pClass ) 100 , offset( offset ) 101 { 102 } 95 103 ~Schedule() 96 104 { … … 127 135 const ::CClass &GetClass() const 128 136 { 129 if( type != Schedule::Vtbl)137 if( !( type == Schedule::Vtbl || type == Schedule::TypeInfo ) ) 130 138 { 131 139 SetError(); -
trunk/abdev/BasicCompiler_Common/include/ver.h
r354 r355 6 6 // バージョン付加文字列 7 7 #ifdef _AMD64_ 8 #define VER_INFO "(x64) (rev.36 1)"8 #define VER_INFO "(x64) (rev.367)" 9 9 #else 10 #define VER_INFO "(rev.36 1)"10 #define VER_INFO "(rev.367)" 11 11 #endif
Note:
See TracChangeset
for help on using the changeset viewer.