Changeset 247 in dev for trunk/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp
- Timestamp:
- Jul 28, 2007, 4:17:56 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp
r246 r247 3 3 #include <CodeGenerator.h> 4 4 5 6 void CodeGenerator::ResolveExitSubSchedule() 7 { 8 BOOST_FOREACH( long exitSubCodePosition, exitSubCodePositions ) 9 { 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 } 19 } 5 20 6 21 void CodeGenerator::CheckUnresolveSchedule() … … 202 217 op_jmp( GetContinueCodePosOld()-obp, sizeof(long), false, true ); 203 218 } 204 void CodeGenerator::op_jmp_ goto_schedule( const GotoLabelSchedule &gotoLabelSchedule)219 void CodeGenerator::op_jmp_exitsub() 205 220 { 206 221 // オペコード 207 222 pNativeCode->Put( (char)0xE9 ); 208 223 224 exitSubCodePositions.push_back( pNativeCode->GetSize() ); 225 226 extern int obp; 227 _exitSubCodePositions_ObpOld.push_back( obp ); 228 229 pNativeCode->Put( (long)0 ); 230 } 231 void CodeGenerator::op_jmp_goto_schedule( const GotoLabelSchedule &gotoLabelSchedule ) 232 { 233 // オペコード 234 pNativeCode->Put( (char)0xE9 ); 235 209 236 gotoLabelSchedules.push_back( gotoLabelSchedule ); 210 237
Note:
See TracChangeset
for help on using the changeset viewer.