Changeset 276 in dev for trunk/abdev/BasicCompiler_Common/src/CommonCodeGenerator.cpp
- Timestamp:
- Aug 12, 2007, 1:25:20 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 );
Note:
See TracChangeset
for help on using the changeset viewer.