- Timestamp:
- May 5, 2008, 12:39:50 AM (17 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/Compile.cpp
r537 r551 744 744 } 745 745 746 compiler.codeGenerator.NextSourceLine( );746 compiler.codeGenerator.NextSourceLine( compiler.GetObjectModule().GetCurrentSourceIndex() ); 747 747 748 748 if(Command[0]==1){ -
trunk/ab5.0/abdev/BasicCompiler_Common/include/CodeGenerator.h
r524 r551 241 241 } 242 242 243 void NextSourceLine( )244 { 245 pNativeCode->NextSourceLine( );243 void NextSourceLine( int currentSourceIndex ) 244 { 245 pNativeCode->NextSourceLine( currentSourceIndex ); 246 246 } 247 247 … … 266 266 continueCodePositions.pop_back(); 267 267 } 268 268 269 void PutWithSchedule( long l, Schedule::Type scheduleType ); 270 269 271 void ResolveExitSubSchedule(); 270 272 … … 469 471 void PutOld( long l, Schedule::Type scheduleType ) 470 472 { 471 pNativeCode->PutEx( l, scheduleType );473 this->PutWithSchedule( l, scheduleType ); 472 474 } 473 475 const PertialSchedule *PutOld( long l, bool isPertialSchedule ) … … 479 481 pPertialSchedule = pertialSchedules.back(); 480 482 } 481 pNativeCode->Put Ex( l, Schedule::None);483 pNativeCode->Put( l ); 482 484 return pPertialSchedule; 483 485 } -
trunk/ab5.0/abdev/BasicCompiler_Common/include/NativeCode.h
r550 r551 254 254 return sourceLines; 255 255 } 256 void NextSourceLine( );256 void NextSourceLine( int currentSourceIndex ); 257 257 258 258 void ResetDataSectionBaseOffset( long dataSectionBaseOffset ); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp
r485 r551 10 10 11 11 12 void CodeGenerator::PutWithSchedule( long l, Schedule::Type scheduleType ) 13 { 14 if( scheduleType == Schedule::CatchAddress ) 15 { 16 const UserProc *pCurrentUserProc = compiler.IsGlobalAreaCompiling() 17 ? UserProc::pGlobalProc 18 : &compiler.GetCompilingUserProc(); 19 20 this->pNativeCode->PutCatchAddressSchedule( pCurrentUserProc, l ); 21 } 22 else 23 { 24 this->pNativeCode->PutEx( l, scheduleType ); 25 } 26 } 27 12 28 void CodeGenerator::ResolveExitSubSchedule() 13 29 { -
trunk/ab5.0/abdev/BasicCompiler_Common/src/NativeCode.cpp
r550 r551 57 57 void NativeCode::PutEx( long l, Schedule::Type scheduleType ) 58 58 { 59 if( scheduleType == Schedule::CatchAddress)59 if( scheduleType != Schedule::None ) 60 60 { 61 const UserProc *pUserProc = &compiler.GetCompilingUserProc(); 62 if( compiler.IsGlobalAreaCompiling() ) 63 { 64 pUserProc = UserProc::pGlobalProc; 65 } 66 PutCatchAddressSchedule( pUserProc, l ); 61 schedules.push_back( Schedule( scheduleType, GetSize() ) ); 67 62 } 68 else69 {70 if( scheduleType != Schedule::None )71 {72 schedules.push_back( Schedule( scheduleType, GetSize() ) );73 }74 63 75 Put( l ); 76 } 64 Put( l ); 77 65 } 78 66 … … 120 108 } 121 109 122 void NativeCode::NextSourceLine( )110 void NativeCode::NextSourceLine( int currentSourceIndex ) 123 111 { 124 112 if( sourceLines.size() ) … … 146 134 (long)sourceLines.size(), 147 135 GetSize(), 148 c ompiler.GetObjectModule().GetCurrentSourceIndex(),136 currentSourceIndex, 149 137 cp, 150 138 sourceLineType -
trunk/ab5.0/abdev/compiler_x86/x86CodeGenerator.cpp
r465 r551 82 82 } 83 83 84 pNativeCode->PutEx( disp, scheduleType );84 this->PutWithSchedule( disp, scheduleType ); 85 85 } 86 86 … … 139 139 pPertialSchedule = pertialSchedules.back(); 140 140 } 141 pNativeCode->PutEx( offset, offsetScheduleType );141 this->PutWithSchedule( offset, offsetScheduleType ); 142 142 143 143 pNativeCode->Put( (char)value ); … … 154 154 pPertialSchedule = pertialSchedules.back(); 155 155 } 156 pNativeCode->PutEx( offset, offsetScheduleType );156 this->PutWithSchedule( offset, offsetScheduleType ); 157 157 158 158 pNativeCode->Put( (short)value ); … … 168 168 pPertialSchedule = pertialSchedules.back(); 169 169 } 170 pNativeCode->PutEx( offset, offsetScheduleType );171 172 pNativeCode->PutEx( value, valueScheduleType );170 this->PutWithSchedule( offset, offsetScheduleType ); 171 172 this->PutWithSchedule( value, valueScheduleType ); 173 173 } 174 174 … … 188 188 pPertialSchedule = pertialSchedules.back(); 189 189 } 190 pNativeCode->PutEx( offset, scheduleType );190 this->PutWithSchedule( offset, scheduleType ); 191 191 192 192 return pPertialSchedule; … … 253 253 pPertialSchedule = pertialSchedules.back(); 254 254 } 255 pNativeCode->PutEx( offset, scheduleType );255 this->PutWithSchedule( offset, scheduleType ); 256 256 } 257 257 else{ … … 320 320 pPertialSchedule = pertialSchedules.back(); 321 321 } 322 pNativeCode->PutEx( offset, scheduleType );322 this->PutWithSchedule( offset, scheduleType ); 323 323 } 324 324 else{ … … 476 476 pPertialSchedule = pertialSchedules.back(); 477 477 } 478 pNativeCode->PutEx( offset, scheduleType );478 this->PutWithSchedule( offset, scheduleType ); 479 479 480 480 return pPertialSchedule; … … 785 785 //push 32ビット値 786 786 pNativeCode->Put( (char)0x68 ); 787 pNativeCode->PutEx( data, scheduleType );787 this->PutWithSchedule( data, scheduleType ); 788 788 } 789 789 } … … 1010 1010 pPertialSchedule = pertialSchedules.back(); 1011 1011 } 1012 pNativeCode->PutEx( offset, scheduleType );1012 this->PutWithSchedule( offset, scheduleType ); 1013 1013 1014 1014 return pPertialSchedule; … … 1047 1047 pPertialSchedule = pertialSchedules.back(); 1048 1048 } 1049 pNativeCode->PutEx( offset, scheduleType );1049 this->PutWithSchedule( offset, scheduleType ); 1050 1050 } 1051 1051 else{ … … 1107 1107 pPertialSchedule = pertialSchedules.back(); 1108 1108 } 1109 pNativeCode->PutEx( offset, scheduleType );1109 this->PutWithSchedule( offset, scheduleType ); 1110 1110 1111 1111 return pPertialSchedule; … … 1144 1144 pPertialSchedule = pertialSchedules.back(); 1145 1145 } 1146 pNativeCode->PutEx( offset, scheduleType );1146 this->PutWithSchedule( offset, scheduleType ); 1147 1147 } 1148 1148 else{
Note:
See TracChangeset
for help on using the changeset viewer.