Changeset 191 in dev for trunk/abdev
- Timestamp:
- Jun 26, 2007, 12:06:12 AM (17 years ago)
- Location:
- trunk/abdev
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler32/BasicCompiler.vcproj
r183 r191 1365 1365 </File> 1366 1366 <File 1367 RelativePath="..\BasicCompiler_Common\include\MetaImpl.h" 1368 > 1369 </File> 1370 <File 1367 1371 RelativePath="..\BasicCompiler_Common\include\ProcedureImpl.h" 1368 1372 > … … 1370 1374 <File 1371 1375 RelativePath="..\BasicCompiler_Common\include\Program.h" 1376 > 1377 </File> 1378 <File 1379 RelativePath="..\BasicCompiler_Common\include\SmoothieImpl.h" 1372 1380 > 1373 1381 </File> -
trunk/abdev/BasicCompiler32/MakePeHdr.cpp
r188 r191 191 191 //クラス情報を取得(※注 - GetSubInfoの後に呼び出す) 192 192 Smoothie::GetMeta().GetClasses().GetAllClassInfo(); 193 194 if( !Smoothie::GetMeta().AutoWrite( Jenga::Common::Environment::GetAppDir() + "\\meta_test.xml" ) ) 195 { 196 ts(0); 197 } 193 198 194 199 //コードと行番号の関係 … … 1702 1707 1703 1708 //コードバッファを解放 1704 HeapDefaultFree(OpBuffer);1709 free(OpBuffer); 1705 1710 OpBuffer=0; 1706 1711 -
trunk/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
r188 r191 456 456 IncludeFileInfo.FilesNum=*(long *)(buffer+i2); 457 457 i2+=sizeof(long); 458 IncludeFileInfo.ppFileNames=(char **) HeapAlloc(hHeap,0,IncludeFileInfo.FilesNum*sizeof(char *));458 IncludeFileInfo.ppFileNames=(char **)malloc(IncludeFileInfo.FilesNum*sizeof(char *)); 459 459 for(i3=0;i3<IncludeFileInfo.FilesNum;i3++){ 460 460 if(buffer[i2]=='\0') break; 461 IncludeFileInfo.ppFileNames[i3]=(char *) HeapAlloc(hHeap,0,lstrlen(buffer+i2)+1);461 IncludeFileInfo.ppFileNames[i3]=(char *)malloc(lstrlen(buffer+i2)+1); 462 462 lstrcpy(IncludeFileInfo.ppFileNames[i3],buffer+i2); 463 463 i2+=lstrlen(buffer+i2)+1; … … 905 905 906 906 907 if(OpBuffer) HeapDefaultFree(OpBuffer);907 if(OpBuffer) free(OpBuffer); 908 908 OpBuffer=(char *)malloc(SizeOf_CodeSection); 909 909 … … 976 976 //インクルード情報を解放 977 977 for(i2=0;i2<IncludeFileInfo.FilesNum;i2++) 978 HeapDefaultFree(IncludeFileInfo.ppFileNames[i2]); 979 HeapDefaultFree(IncludeFileInfo.ppFileNames); 978 { 979 free(IncludeFileInfo.ppFileNames[i2]); 980 } 981 free(IncludeFileInfo.ppFileNames); 980 982 981 983 //クラスに関するメモリを解放 -
trunk/abdev/BasicCompiler_Common/MakeExe.cpp
r182 r191 249 249 extern INCLUDEFILEINFO IncludeFileInfo; 250 250 for(i2=0;i2<IncludeFileInfo.FilesNum;i2++) 251 HeapDefaultFree(IncludeFileInfo.ppFileNames[i2]); 252 HeapDefaultFree(IncludeFileInfo.ppFileNames); 251 { 252 free(IncludeFileInfo.ppFileNames[i2]); 253 } 254 free(IncludeFileInfo.ppFileNames); 253 255 } 254 256 int MainThread(DWORD dummy){ -
trunk/abdev/BasicCompiler_Common/include/ClassImpl.h
r184 r191 8 8 ClassImpl( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name ) 9 9 : CClass( namespaceScopes, importedNamespaces, name ) 10 { 11 } 12 ClassImpl() 13 : CClass() 10 14 { 11 15 } … … 26 30 virtual LONG_PTR GetVtblGlobalOffset(void) const; 27 31 virtual void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection); 32 33 34 // XMLシリアライズ用 35 private: 36 friend class boost::serialization::access; 37 template<class Archive> void serialize(Archive& ar, const unsigned int version) 38 { 39 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( CClass ); 40 } 28 41 }; 42 BOOST_IS_ABSTRACT( CClass ); 29 43 30 44 class ClassesImpl : public Classes 31 45 { 32 46 public: 47 ClassesImpl() 48 : Classes() 49 { 50 } 51 33 52 virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name); 34 53 virtual void CollectClassesForNameOnly( const BasicSource &source ); … … 43 62 virtual void Compile_System_InitializeUserTypes(); 44 63 64 65 // XMLシリアライズ用 66 private: 67 friend class boost::serialization::access; 68 BOOST_SERIALIZATION_SPLIT_MEMBER(); 69 template<class Archive> void load(Archive& ar, const unsigned int version) 70 { 71 std::vector<ClassImpl *> vectorClasses; 72 ar & BOOST_SERIALIZATION_NVP( vectorClasses ); 73 74 // 読み込み後の処理 75 Clear(); 76 BOOST_FOREACH( CClass *pClass, vectorClasses ) 77 { 78 Insert( pClass ); 79 } 80 } 81 template<class Archive> void save(Archive& ar, const unsigned int version) const 82 { 83 // 保存準備 84 std::vector<ClassImpl *> vectorClasses; 85 vectorClasses.clear(); 86 Iterator_Reset(); 87 while( Iterator_HasNext() ) 88 { 89 vectorClasses.push_back( dynamic_cast<ClassImpl *>(Iterator_GetNext()) ); 90 } 91 92 ar & BOOST_SERIALIZATION_NVP( vectorClasses ); 93 } 45 94 }; 95 BOOST_IS_ABSTRACT( Classes ); -
trunk/abdev/BasicCompiler_Common/src/SmoothieImpl.cpp
r184 r191 1 1 #include <jenga/include/smoothie/Smoothie.h> 2 2 3 #include <SmoothieImpl.h> 3 4 #include <ClassImpl.h> 4 5 #include <ProcedureImpl.h> 5 6 #include <LexicalScopingImpl.h> 6 7 7 Meta Smoothie::meta( 8 new ClassesImpl(), 9 new ProcPointersImpl() 10 ); 8 MetaImpl SmoothieImpl::metaImpl( 9 new ClassesImpl() 10 ); 11 11 12 12 CLexicalScopes *Smoothie::Temp::pLexicalScopes = new LexicalScopesImpl(); 13 14 15 Meta &Smoothie::GetMeta() 16 { 17 return SmoothieImpl::metaImpl; 18 }
Note:
See TracChangeset
for help on using the changeset viewer.