Changeset 276 in dev for trunk/abdev/BasicCompiler_Common
- Timestamp:
- Aug 12, 2007, 1:25:20 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp
r269 r276 97 97 //この部分にobpのチェックを挿入 98 98 //※例 … epi=0x41999 → obp>=0x0999 99 99 /* 100 100 extern int obp; 101 101 if(obp>=0x988DE){ 102 102 int test=0; 103 } 103 }*/ 104 104 } 105 105 -
trunk/abdev/BasicCompiler_Common/Compile.cpp
r263 r276 81 81 } 82 82 83 84 void NextLine(void){85 extern int obp;86 87 extern SourceLines oldSourceLines;88 if( oldSourceLines.size() )89 {90 if( oldSourceLines.back().GetNativeCodePos() == obp )91 {92 oldSourceLines.back().SetSourceCodePos( cp );93 return;94 }95 }96 97 extern BOOL bDebugSupportProc;98 extern BOOL bSystemProc;99 DWORD sourceLineType = 0;100 if( bDebugSupportProc )101 {102 sourceLineType |= CODETYPE_DEBUGPROC;103 }104 if( bSystemProc )105 {106 sourceLineType |= CODETYPE_SYSTEMPROC;107 }108 oldSourceLines.push_back( SourceLine( (long)oldSourceLines.size(), obp, cp, sourceLineType ) );109 }110 111 83 void ChangeOpcode(char *Command){ 112 84 extern HANDLE hHeap; … … 121 93 if(Command[0]=='*'&&IsVariableTopChar(Command[1])){ 122 94 //Goto先ラベル 123 extern int obp; 124 compiler.codeGenerator.gotoLabels.push_back( GotoLabel( Command + 1, obp ) ); 95 compiler.codeGenerator.gotoLabels.push_back( GotoLabel( Command + 1, compiler.codeGenerator.GetNativeCodeSize() ) ); 125 96 126 97 //書き込みスケジュール … … 475 446 OpcodeDim(Command+2,0); 476 447 477 // ネイティブコードバッファの再確保478 ReallocNativeCodeBuffer();479 480 448 if(basbuf[cp]=='\0') break; 481 449 i2=-1; … … 533 501 534 502 //Goto先ラベル 535 extern int obp; 536 compiler.codeGenerator.gotoLabels.push_back( GotoLabel( (long)i3, obp ) ); 503 compiler.codeGenerator.gotoLabels.push_back( GotoLabel( (long)i3, compiler.codeGenerator.GetNativeCodeSize() ) ); 537 504 538 505 //書き込みスケジュール … … 639 606 } 640 607 641 NextLine();642 608 compiler.codeGenerator.NextSourceLine(); 643 609 … … 675 641 if(bStopCompile) return 0; 676 642 677 ReallocNativeCodeBuffer();678 679 643 if(basbuf[cp]=='\0'){ 680 644 switch(Return_Command){ -
trunk/abdev/BasicCompiler_Common/Debug.cpp
r266 r276 9 9 #include "../BasicCompiler_Common/debug.h" 10 10 11 externchar *OpBuffer;11 char *OpBuffer; 12 12 13 13 extern DWORD dwStepRun; -
trunk/abdev/BasicCompiler_Common/Diagnose.cpp
r265 r276 23 23 /////////////////////////////////////////////////////////////////// 24 24 25 extern int obp;26 25 extern int GlobalOpBufferSize; 27 26 sprintf(temporary, "%d", GlobalOpBufferSize/1024 ); 28 27 trace_for_size( (string)"グローバル領域のコードサイズ: " + temporary + "KB" ); 29 sprintf(temporary, "%d", (obp-GlobalOpBufferSize)/1024 );30 trace_for_size( (string)"ローカル領域のコードサイズ: " + temporary + "KB" );31 sprintf(temporary, "%d", obp/1024 );32 trace_for_size( (string)"コードサイズ総量: " + temporary + "KB" );28 //sprintf(temporary, "%d", (obp-GlobalOpBufferSize)/1024 ); 29 //trace_for_size( (string)"ローカル領域のコードサイズ: " + temporary + "KB" ); 30 //sprintf(temporary, "%d", obp/1024 ); 31 //trace_for_size( (string)"コードサイズ総量: " + temporary + "KB" ); 33 32 } 34 33 -
trunk/abdev/BasicCompiler_Common/Object.cpp
r206 r276 63 63 64 64 ss[0]++; 65 66 67 //ネイティブコードバッファの再確保68 ReallocNativeCodeBuffer();69 65 } 70 66 } -
trunk/abdev/BasicCompiler_Common/PESchedule.cpp
r266 r276 131 131 } 132 132 } 133 134 135 136 137 //////////////////////////138 // 一般スケジュール139 //////////////////////////140 141 CSchedule::CSchedule(){142 pObpValues=(int *)HeapAlloc(hHeap,0,1);143 num=0;144 145 this->flag=0;146 }147 CSchedule::~CSchedule(){148 HeapDefaultFree(pObpValues);149 }150 void CSchedule::SetFlag(int flag){151 this->flag=flag;152 }153 void CSchedule::add(){154 pObpValues=(int *)HeapReAlloc(hHeap,0,pObpValues,(num+1)*sizeof(int));155 extern int obp;156 pObpValues[num]=obp;157 num++;158 159 if(flag&SCHEDULE_FLAG_RELOC){160 //リロケーション情報を追加する161 pobj_Reloc->AddSchedule_CodeSection(obp);162 }163 }164 void CSchedule::move(int iStartPos,int iSize,int offset){165 int i;166 for(i=0;i<num;i++){167 if(iStartPos<=pObpValues[i] && pObpValues[i]<iStartPos+iSize){168 pObpValues[i]+=offset;169 }170 }171 }172 173 //データテーブルスケジュール174 CSchedule *pobj_DataTableSchedule;175 176 //グローバル変数アドレススケジュール177 CSchedule *pobj_GlobalVarSchedule;178 179 180 181 /////////////////////////////////////////182 // インポート アドレス スケジューリング183 /////////////////////////////////////////184 185 CImportAddrSchedule::CImportAddrSchedule(){186 ppdi=(const DllProc **)HeapAlloc(hHeap,0,1);187 }188 CImportAddrSchedule::~CImportAddrSchedule(){189 HeapDefaultFree(ppdi);190 }191 192 void CImportAddrSchedule::add(const DllProc *pDllProc){193 ppdi=(const DllProc **)HeapReAlloc(hHeap,0,ppdi,(num+1)*sizeof(DllProc *));194 ppdi[num]=pDllProc;195 196 CSchedule::add();197 }198 199 CImportAddrSchedule *pobj_ImportAddrSchedule;200 201 202 203 204 /////////////////////////////////////////205 // プロシージャ アドレス スケジューリング206 /////////////////////////////////////////207 208 CSubAddrSchedule::CSubAddrSchedule(){209 ppsi=(const UserProc **)HeapAlloc(hHeap,0,1);210 pbCall=(BOOL *)HeapAlloc(hHeap,0,1);211 }212 CSubAddrSchedule::~CSubAddrSchedule(){213 HeapDefaultFree(ppsi);214 HeapDefaultFree(pbCall);215 }216 217 void CSubAddrSchedule::add(const UserProc *pUserProc,BOOL bCall){218 if(!pUserProc) return;219 220 ppsi=(const UserProc **)HeapReAlloc(hHeap,0,ppsi,(num+1)*sizeof(UserProc *));221 ppsi[num]=pUserProc;222 pbCall=(BOOL *)HeapReAlloc(hHeap,0,pbCall,(num+1)*sizeof(BOOL));223 pbCall[num]=bCall;224 225 CSchedule::add();226 227 if(!bCall){228 //リロケーション情報を追加する229 extern int obp;230 pobj_Reloc->AddSchedule_CodeSection(obp);231 }232 }233 234 CSubAddrSchedule *pobj_SubAddrSchedule; -
trunk/abdev/BasicCompiler_Common/PESchedule.h
r242 r276 39 39 40 40 41 //////////////////////////42 // 一般スケジューリング43 //////////////////////////44 #define SCHEDULE_FLAG_RELOC 145 class CSchedule{46 int flag;47 public:48 int *pObpValues;49 int num;50 51 CSchedule();52 ~CSchedule();53 void SetFlag(int flag);54 55 void add();56 void move(int iStartPos,int iSize,int offset);57 };58 extern CSchedule *pobj_DataTableSchedule;59 extern CSchedule *pobj_GlobalVarSchedule;60 61 62 63 /////////////////////////////////////////64 // インポート アドレス スケジューリング65 /////////////////////////////////////////66 class CImportAddrSchedule:public CSchedule{67 public:68 const DllProc **ppdi;69 70 CImportAddrSchedule();71 ~CImportAddrSchedule();72 73 void add(const DllProc *pDllProc);74 };75 extern CImportAddrSchedule *pobj_ImportAddrSchedule;76 77 78 79 /////////////////////////////////////////80 // プロシージャ アドレス スケジューリング81 /////////////////////////////////////////82 class CSubAddrSchedule:public CSchedule{83 public:84 const UserProc **ppsi;85 BOOL *pbCall;86 87 CSubAddrSchedule();88 ~CSubAddrSchedule();89 90 void add(const UserProc *pUserProc,BOOL bCall);91 };92 extern CSubAddrSchedule *pobj_SubAddrSchedule;93 94 95 96 41 void NativeBuffer_StaticRelocation(int iStartPos,int iSize,int offset); -
trunk/abdev/BasicCompiler_Common/include/CodeGenerator.h
r263 r276 10 10 #endif 11 11 12 void ReallocNativeCodeBuffer();13 14 12 // コード生成時の部分的なスケジューリング 15 13 class PertialSchedule … … 18 16 int typeSize; // 対象サイズ(一般的には8bit/32bit) 19 17 20 int _obpOld; // 未完成21 18 public: 22 19 PertialSchedule( int codePos, int typeSize ) … … 24 21 , typeSize( typeSize ) 25 22 { 26 extern int obp;27 _obpOld = obp;28 23 } 29 24 ~PertialSchedule() … … 38 33 { 39 34 return typeSize; 40 }41 int GetObpOld() const42 {43 return _obpOld;44 35 } 45 36 }; … … 201 192 // Continue用のコード位置情報の管理 202 193 std::vector<long> continueCodePositions; 203 std::vector<long> _continueCodePositions_ObpOld;204 194 205 195 public: … … 210 200 // Exit Subスケジュールの管理 211 201 std::vector<long> exitSubCodePositions; 212 std::vector<int> _exitSubCodePositions_ObpOld;213 202 214 203 // Gotoスケジュールの管理 … … 239 228 pNativeCode = &nativeCode; 240 229 } 230 long GetNativeCodeSize() const 231 { 232 return pNativeCode->GetSize(); 233 } 241 234 242 235 void NextSourceLine() … … 256 249 { 257 250 continueCodePositions.clear(); 258 _continueCodePositions_ObpOld.clear();259 251 } 260 252 void ContinueAreaBegin() 261 253 { 262 254 continueCodePositions.push_back( pNativeCode->GetSize() ); 263 264 extern int obp;265 _continueCodePositions_ObpOld.push_back( obp );266 255 } 267 256 void ContinueAreaEnd() 268 257 { 269 258 continueCodePositions.pop_back(); 270 _continueCodePositions_ObpOld.pop_back();271 }272 long GetContinueCodePosOld() const273 {274 if( _continueCodePositions_ObpOld.size() == 0 )275 {276 return -1;277 }278 return _continueCodePositions_ObpOld[_continueCodePositions_ObpOld.size()-1];279 259 } 280 260 … … 489 469 void PutOld( const NativeCode &nativeCode ) 490 470 { 491 pNativeCode->Put( nativeCode , true);471 pNativeCode->Put( nativeCode ); 492 472 } 493 473 void PutOld( char c ) -
trunk/abdev/BasicCompiler_Common/include/NativeCode.h
r273 r276 6 6 7 7 #include <BoostSerializationSupport.h> 8 9 void ObpPlus( int step = 1 );10 8 11 9 class UserProc; … … 270 268 { 271 269 } 272 NativeCode( const NativeCode &nativeCode , bool isOpBuffer)270 NativeCode( const NativeCode &nativeCode ) 273 271 : allocateSize( 8192 ) 274 272 , codeBuffer( (char *)malloc( allocateSize ) ) 275 273 , size( 0 ) 276 274 { 277 Put( nativeCode , isOpBuffer);278 } 279 NativeCode( const char *codeBuffer, int size , bool isOpBuffer)275 Put( nativeCode ); 276 } 277 NativeCode( const char *codeBuffer, int size ) 280 278 : allocateSize( 8192 ) 281 279 , codeBuffer( (char *)malloc( allocateSize ) ) 282 280 , size( 0 ) 283 281 { 284 Put( codeBuffer, size , isOpBuffer);282 Put( codeBuffer, size ); 285 283 } 286 284 ~NativeCode() … … 296 294 { 297 295 Clear(); 298 Put( nativeCode , false);296 Put( nativeCode ); 299 297 } 300 298 … … 316 314 return *(long *)(this->codeBuffer+codePos); 317 315 } 318 long _GetLong_ObpOld( int _obpOld ) const319 {320 extern char *OpBuffer;321 return *(long *)(OpBuffer+_obpOld);322 }323 316 324 317 void Overwrite( int codePos, char c ) … … 326 319 codeBuffer[codePos] = c; 327 320 } 328 void OverwriteOld( int _obpOld, char c )329 {330 // 未完成331 extern char *OpBuffer;332 OpBuffer[_obpOld] = c;333 }334 321 void Overwrite( int codePos, long newLongValue ) 335 322 { 336 323 *(long *)(this->codeBuffer+codePos) = newLongValue; 337 324 } 338 void OverwriteOld( int _obpOld, long newLongValue ) 339 { 340 // 未完成 341 extern char *OpBuffer; 342 *(long *)(OpBuffer+_obpOld) = newLongValue; 343 } 344 345 void Put( const char *codeBuffer, int size, bool isOpBuffer = true ) 325 326 void Put( const char *codeBuffer, int size ) 346 327 { 347 328 Realloc( this->size + size ); … … 349 330 memcpy( this->codeBuffer + this->size, codeBuffer, size ); 350 331 this->size += size; 351 352 // 未完成 353 if( isOpBuffer ) 354 { 355 extern char *OpBuffer; 356 extern int obp; 357 memcpy( OpBuffer + obp, codeBuffer, size ); 358 ObpPlus( size ); 359 } 360 } 361 void Put( const NativeCode &nativeCode, bool isOpBuffer ); 332 } 333 void Put( const NativeCode &nativeCode ); 362 334 void Put( _int64 i64data ) 363 335 { … … 373 345 *((long *)(codeBuffer+size))=l; 374 346 size += sizeof(long); 375 376 377 378 // 未完成379 switch( scheduleType )380 {381 case Schedule::None:382 // 何もしない383 break;384 case Schedule::GlobalVar:385 extern CSchedule *pobj_GlobalVarSchedule;386 pobj_GlobalVarSchedule->add();387 break;388 case Schedule::DataTable:389 extern CSchedule *pobj_DataTableSchedule;390 pobj_DataTableSchedule->add();391 break;392 case Schedule::Relocation:393 // 未完成394 break;395 default:396 Jenga::Throw( "scheduleTypeが無効な値を保持している" );397 break;398 }399 extern char *OpBuffer;400 extern int obp;401 *((long *)(OpBuffer+obp))=l;402 ObpPlus( sizeof(long) );403 347 } 404 348 void PutUserProcSchedule( const UserProc *pUserProc, bool isCall ); … … 412 356 Realloc( size + 1 ); 413 357 codeBuffer[size++] = c; 414 415 416 417 // 未完成418 extern char *OpBuffer;419 extern int obp;420 OpBuffer[obp]=c;421 ObpPlus();422 358 } 423 359 -
trunk/abdev/BasicCompiler_Common/include/Procedure.h
r271 r276 373 373 return *pCompilingUserProc; 374 374 } 375 376 377 378 mutable long _beginOpAddressOld;379 mutable long _endOpAddressOld;380 375 }; 381 376 -
trunk/abdev/BasicCompiler_Common/include/Prototype.h
r215 r276 30 30 { 31 31 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol ); 32 ar & BOOST_SERIALIZATION_NVP( isUsing ); 32 33 } 33 34 -
trunk/abdev/BasicCompiler_Common/include/option.h
r270 r276 34 34 35 35 // モジュールサイズに関するログを生成する 36 //#define USE_TRACE_FOR_SIZE36 #define USE_TRACE_FOR_SIZE 37 37 38 38 // XMLシリアライズに関するログを生成する -
trunk/abdev/BasicCompiler_Common/src/Class.cpp
r272 r276 732 732 if(!pUserProc) continue; 733 733 734 // 古いOpBufferを利用する場合は_beginOpAddressOldでないとダメ735 //pVtbl[i]=pUserProc->_beginOpAddressOld+ImageBase+MemPos_CodeSection;736 734 pVtbl[i]=pUserProc->GetBeginOpAddress()+ImageBase+MemPos_CodeSection; 737 735 } … … 954 952 member->GetConstructParameter().c_str(), 955 953 0); 956 957 //ネイティブコードバッファの再確保958 ReallocNativeCodeBuffer();959 954 960 955 i++; … … 1502 1497 // コンパイル 1503 1498 ChangeOpcode( temporary ); 1504 1505 // ネイティブコードバッファの再確保1506 ReallocNativeCodeBuffer();1507 1499 } 1508 1500 … … 1550 1542 ChangeOpcode( temporary ); 1551 1543 } 1552 1553 // ネイティブコードバッファの再確保1554 ReallocNativeCodeBuffer();1555 1544 } 1556 1545 -
trunk/abdev/BasicCompiler_Common/src/CodeGenerator.cpp
r206 r276 4 4 #include <stdlib.h> 5 5 6 int obp,obp_AllocSize;7 6 int GlobalOpBufferSize; 8 char *OpBuffer;9 void ReallocNativeCodeBuffer(){10 if(obp_AllocSize<obp+8192){11 obp_AllocSize+=8192;12 OpBuffer=(char *)realloc(OpBuffer,obp_AllocSize); //matea13 }14 } -
trunk/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp
r254 r276 9 9 { 10 10 pNativeCode->Overwrite( exitSubCodePosition, (long)( pNativeCode->GetSize()-(exitSubCodePosition+sizeof(long)) ) ); 11 }12 13 // TODO: 未完成14 BOOST_FOREACH( long exitSubCodePositionOld, _exitSubCodePositions_ObpOld )15 {16 extern int obp;17 pNativeCode->OverwriteOld( exitSubCodePositionOld, (long)( obp-(exitSubCodePositionOld+sizeof(long)) ) );18 11 } 19 12 } … … 45 38 46 39 pNativeCode->Overwrite( pPertialSchedule->GetCodePos(), (char)newValue ); 47 48 // TODO: 未完成(用が無くなったら消す)49 pNativeCode->OverwriteOld( pPertialSchedule->GetObpOld(), (char)newValue );50 40 } 51 41 else if( pPertialSchedule->GetTypeSize() == sizeof(long) ) 52 42 { 53 43 pNativeCode->Overwrite( pPertialSchedule->GetCodePos(), newValue ); 54 55 // TODO: 未完成(用が無くなったら消す)56 pNativeCode->OverwriteOld( pPertialSchedule->GetObpOld(), newValue );57 44 } 58 45 else … … 94 81 pNativeCode->GetLong(pPertialSchedule->GetCodePos()) + offset 95 82 ); 96 97 // TODO: 未完成(用が無くなったら消す)98 pNativeCode->OverwriteOld(99 pPertialSchedule->GetObpOld(),100 pNativeCode->_GetLong_ObpOld(pPertialSchedule->GetObpOld()) + offset101 );102 83 } 103 84 else … … 136 117 { 137 118 long newValue = pNativeCode->GetSize() - (pPertialSchedule->GetCodePos()+pPertialSchedule->GetTypeSize()); 138 139 extern int obp;140 long newValueOld = obp - (pPertialSchedule->GetObpOld()+pPertialSchedule->GetTypeSize());141 119 142 120 if( pPertialSchedule->GetTypeSize() == sizeof(char) ) … … 149 127 150 128 pNativeCode->Overwrite( pPertialSchedule->GetCodePos(), (char)newValue ); 151 152 // TODO: 未完成(用が無くなったら消す)153 pNativeCode->OverwriteOld( pPertialSchedule->GetObpOld(), (char)newValueOld );154 129 } 155 130 else if( pPertialSchedule->GetTypeSize() == sizeof(long) ) 156 131 { 157 132 pNativeCode->Overwrite( pPertialSchedule->GetCodePos(), newValue ); 158 159 // TODO: 未完成(用が無くなったら消す)160 pNativeCode->OverwriteOld( pPertialSchedule->GetObpOld(), newValueOld );161 133 } 162 134 else … … 184 156 { 185 157 long beginCodePos = pNativeCode->GetSize(); 186 {187 // TODO: 未完成188 extern int obp;189 beginCodePos = obp;190 }191 158 192 159 if( opcode == (char)0xEB ) … … 233 200 { 234 201 // 自分自身の命令サイズを考慮する場合 235 //offset += ( pNativeCode->GetSize() - beginCodePos ) + op_size; 236 237 // TODO: 未完成 238 extern int obp; 239 offset -= ( obp - beginCodePos ) + op_size; 202 offset -= ( pNativeCode->GetSize() - beginCodePos ) + op_size; 240 203 } 241 204 … … 301 264 void CodeGenerator::op_jmp_continue() 302 265 { 303 ////////////////////////////////////304 // エラー検出(必要なくなったら消す)305 extern int obp;306 if( GetContinueCodePosOld()-obp != GetContinueCodePos()-pNativeCode->GetSize() )307 {308 int continueCodePosOld = GetContinueCodePosOld();309 int continueCodePos = GetContinueCodePos();310 int size = pNativeCode->GetSize();311 int test=0;312 SetError();313 }314 ////////////////////////////////////315 316 317 266 if( GetContinueCodePos() == -1 ) 318 267 { … … 328 277 329 278 exitSubCodePositions.push_back( pNativeCode->GetSize() ); 330 331 extern int obp;332 _exitSubCodePositions_ObpOld.push_back( obp );333 279 334 280 pNativeCode->Put( (long)0 ); -
trunk/abdev/BasicCompiler_Common/src/LexicalScope.cpp
r265 r276 79 79 if(pVar->bLiving&&pVar->GetScopeLevel()==level){ 80 80 pVar->bLiving=0; 81 extern int obp; 82 pVar->SetScopeEndAddress( obp ); 81 pVar->SetScopeEndAddress( compiler.codeGenerator.GetNativeCodeSize() ); 83 82 } 84 83 } -
trunk/abdev/BasicCompiler_Common/src/Linker.cpp
r273 r276 110 110 } 111 111 112 nativeCode.Put( masterObjectModule.globalNativeCode , false);112 nativeCode.Put( masterObjectModule.globalNativeCode ); 113 113 114 114 masterObjectModule.meta.GetUserProcs().Iterator_Reset(); … … 117 117 const UserProc *pUserProc = masterObjectModule.meta.GetUserProcs().Iterator_GetNext(); 118 118 119 if( pUserProc-> IsUsing())119 if( pUserProc->GetNativeCode().GetSize() > 0 ) 120 120 { 121 121 pUserProc->SetBeginOpAddress( nativeCode.GetSize() ); 122 122 123 nativeCode.Put( pUserProc->GetNativeCode() , false);123 nativeCode.Put( pUserProc->GetNativeCode() ); 124 124 125 125 pUserProc->SetEndOpAddress( nativeCode.GetSize() ); -
trunk/abdev/BasicCompiler_Common/src/NativeCode.cpp
r273 r276 6 6 #define BREAK_EIP(checkEip) (obp+0x00401000>=checkEip) 7 7 8 void ObpPlus( int step ) 9 { 10 extern int obp; 11 obp += step; 12 13 // 例:epi=0x00401999 14 if( BREAK_EIP(0x00433FD7) ) 15 { 16 int test=0; 17 } 18 } 19 20 void NativeCode::Put( const NativeCode &nativeCode, bool isOpBuffer ) 8 void NativeCode::Put( const NativeCode &nativeCode ) 21 9 { 22 10 long baseOffset = size; 23 11 24 12 // コードバッファを追加 25 Put( nativeCode.codeBuffer, nativeCode.size , isOpBuffer);13 Put( nativeCode.codeBuffer, nativeCode.size ); 26 14 27 15 // スケジュールを追加 … … 64 52 *((long *)(codeBuffer+size))=0; 65 53 size += sizeof(long); 66 67 68 69 // 未完成70 if( isCall )71 {72 pobj_SubAddrSchedule->add(pUserProc,1);73 }74 else75 {76 pobj_SubAddrSchedule->add(pUserProc,0);77 }78 extern char *OpBuffer;79 extern int obp;80 *((long *)(OpBuffer+obp))=0;81 ObpPlus( sizeof(long) );82 54 } 83 55 … … 90 62 *((long *)(codeBuffer+size))=0; 91 63 size += sizeof(long); 92 93 94 95 // 未完成96 pobj_ImportAddrSchedule->add(pDllProc);97 extern char *OpBuffer;98 extern int obp;99 *((long *)(OpBuffer+obp))=0;100 ObpPlus( sizeof(long) );101 64 } 102 65 -
trunk/abdev/BasicCompiler_Common/src/ObjectModule.cpp
r274 r276 8 8 meta.StaticLink( objectModule.meta, dataTable.GetSize() ); 9 9 10 // ネイティブコードを結合 11 globalNativeCode.Put( objectModule.globalNativeCode ); 12 globalNativeCode.ResetDataSectionBaseOffset( dataTable.GetSize() ); 13 10 14 // データテーブルを結合 11 15 dataTable.Add( objectModule.dataTable );
Note:
See TracChangeset
for help on using the changeset viewer.