Changeset 585 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
- Timestamp:
- May 10, 2008, 1:40:33 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
r566 r585 78 78 { 79 79 // テキストデータにシリアライズ 80 std::string textString;81 compiler.GetObjectModule(). WriteString( textString);80 Jenga::Common::Binary binary; 81 compiler.GetObjectModule().Save( binary ); 82 82 83 83 // サイズ 84 *(long *)(buffer+i2) = (long) textString.size();84 *(long *)(buffer+i2) = (long)binary.GetSize(); 85 85 i2+=sizeof(long); 86 86 87 87 //バッファが足りない場合は再確保 88 if(BufferSize<i2+(int) textString.size()+32768){89 while( BufferSize<i2+(int) textString.size()+32768 )88 if(BufferSize<i2+(int)binary.GetSize()+32768){ 89 while( BufferSize<i2+(int)binary.GetSize()+32768 ) 90 90 { 91 91 BufferSize+=32768; … … 96 96 97 97 // バッファ 98 memcpy( buffer+i2, textString.c_str(), textString.size() );99 i2 += (int) textString.size();98 memcpy( buffer+i2, binary.GetBuffer(), binary.GetSize() ); 99 i2 += (int)binary.GetSize(); 100 100 } 101 101 … … 187 187 188 188 // バッファ 189 const std::string textString( (const char *)(buffer + i2), size );189 const Jenga::Common::Binary binary( (const char *)(buffer + i2), size ); 190 190 i2 += size; 191 191 192 192 // テキストデータからシリアライズ 193 this->objectModule. ReadString( textString);193 this->objectModule.Load( binary ); 194 194 195 195 compiler.SelectObjectModule( this->objectModule ); … … 247 247 //ソースコード 248 248 extern char *basbuf; 249 basbuf = const_cast<char *>(compiler.GetObjectModule(). GetSource(0).GetBuffer());249 basbuf = const_cast<char *>(compiler.GetObjectModule().nativeSection.GetSource(0).GetBuffer()); 250 250 251 251
Note:
See TracChangeset
for help on using the changeset viewer.