Changeset 253 in dev for trunk/abdev/BasicCompiler_Common/Compile.cpp
- Timestamp:
- Jul 30, 2007, 4:12:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/Compile.cpp
r250 r253 88 88 extern LINEINFO *pLineInfo; 89 89 if(MaxLineInfoNum){ 90 extern int obp; 90 91 if(pLineInfo[MaxLineInfoNum-1].TopObp==obp){ 91 92 pLineInfo[MaxLineInfoNum-1].TopCp=cp; … … 95 96 pLineInfo=(LINEINFO *)HeapReAlloc(hHeap,0,pLineInfo,(MaxLineInfoNum+1)*sizeof(LINEINFO)); 96 97 pLineInfo[MaxLineInfoNum].TopCp=cp; 98 extern int obp; 97 99 pLineInfo[MaxLineInfoNum].TopObp=obp; 98 100 … … 123 125 pLabelNames[MaxLabelNum].pName=(char *)HeapAlloc(hHeap,0,lstrlen(Command+1)+1); 124 126 lstrcpy(pLabelNames[MaxLabelNum].pName,Command+1); 127 extern int obp; 125 128 pLabelNames[MaxLabelNum].address=obp; 126 129 MaxLabelNum++; 127 130 128 131 //書き込みスケジュール 129 std::vector<GotoLabelSchedule>::iterator it = compiler.codeGenerator.gotoLabelSchedules.begin();132 GotoLabelSchedules::iterator it = compiler.codeGenerator.gotoLabelSchedules.begin(); 130 133 while( it != compiler.codeGenerator.gotoLabelSchedules.end() ) 131 134 { 132 if( it->GetName() == Command+1 )135 if( (*it)->GetName() == Command+1 ) 133 136 { 134 *((long *)( OpBuffer + it->GetNativeCodePos() ))=obp-(it->GetNativeCodePos()+sizeof(long));137 compiler.codeGenerator.opfix_JmpPertialSchedule( (*it) ); 135 138 136 139 //詰める … … 335 338 extern BOOL bDebugCompile; 336 339 //int 3 337 if(bDebugCompile) OpBuffer[obp++]=(char)0xCC; 340 if(bDebugCompile) 341 { 342 breakpoint; 343 } 338 344 #if defined(_DEBUG) 339 else OpBuffer[obp++]=(char)0xCC; 345 else 346 { 347 breakpoint; 348 } 340 349 #endif 341 350 break; … … 532 541 pLabelNames[MaxLabelNum].pName=0; 533 542 pLabelNames[MaxLabelNum].line=i3; 543 extern int obp; 534 544 pLabelNames[MaxLabelNum].address=obp; 535 545 MaxLabelNum++; 536 546 537 547 //書き込みスケジュール 538 std::vector<GotoLabelSchedule>::iterator it = compiler.codeGenerator.gotoLabelSchedules.begin();548 GotoLabelSchedules::iterator it = compiler.codeGenerator.gotoLabelSchedules.begin(); 539 549 while( it != compiler.codeGenerator.gotoLabelSchedules.end() ) 540 550 { 541 if( it->GetName().size() == 0 && it->GetLineNum() == i3 )551 if( (*it)->GetName().size() == 0 && (*it)->GetLineNum() == i3 ) 542 552 { 543 *((long *)( OpBuffer + it->GetNativeCodePos() ))=obp-(it->GetNativeCodePos()+sizeof(long));544 553 compiler.codeGenerator.opfix_JmpPertialSchedule( (*it) ); 554 545 555 //詰める 546 556 it = compiler.codeGenerator.gotoLabelSchedules.erase( it );
Note:
See TracChangeset
for help on using the changeset viewer.