Changeset 115 for trunk/UBFTarget.pas
- Timestamp:
- Oct 13, 2020, 8:05:14 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UBFTarget.pas
r114 r115 19 19 Parameter: Integer; 20 20 RelIndex: Integer; 21 function Create(Command: TMachineCommand; Parameter, RelIndex: Integer): TMachineOperation;21 class function Create(Command: TMachineCommand; Parameter, RelIndex: Integer): TMachineOperation; static; 22 22 end; 23 23 … … 65 65 { TMachineOperation } 66 66 67 function TMachineOperation.Create(Command: TMachineCommand; Parameter,67 class function TMachineOperation.Create(Command: TMachineCommand; Parameter, 68 68 RelIndex: Integer): TMachineOperation; 69 69 begin … … 150 150 PreviousCommand: TMachineCommand; 151 151 FirstIndex: Integer; 152 NewT extIndex: Integer;152 NewTargetIndex: Integer; 153 153 begin 154 154 // Merge together cmInc, cmDec, cmSet … … 159 159 160 160 FProgramIndex := 0; 161 NewT extIndex := 0;161 NewTargetIndex := 0; 162 162 while (FProgramIndex < Length(FProgram)) do begin 163 163 FirstIndex := FProgramIndex; … … 272 272 end; 273 273 PreviousCommand := FProgram[FProgramIndex].Command; 274 DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewT extIndex);275 Inc(NewT extIndex, Length(GetOperationText(NewProgram[NewProgramIndex])));274 DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewTargetIndex); 275 Inc(NewTargetIndex, Length(GetOperationText(NewProgram[NewProgramIndex]))); 276 276 Inc(FProgramIndex); 277 277 Inc(NewProgramIndex); … … 297 297 RelIndex: Integer; 298 298 FirstIndex: Integer; 299 NewT extIndex: Integer;299 NewTargetIndex: Integer; 300 300 begin 301 301 NewProgramIndex := 0; … … 304 304 RelIndex := 0; 305 305 FProgramIndex := 0; 306 NewT extIndex := 0;306 NewTargetIndex := 0; 307 307 while (FProgramIndex < Length(FProgram)) do begin 308 308 FirstIndex := FProgramIndex; … … 338 338 else raise Exception.Create(Format('Unsupported command %d', [FProgram[FProgramIndex].Command])); 339 339 end; 340 DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewT extIndex);341 Inc(NewT extIndex, Length(GetOperationText(NewProgram[NewProgramIndex])));340 DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewTargetIndex); 341 Inc(NewTargetIndex, Length(GetOperationText(NewProgram[NewProgramIndex]))); 342 342 Inc(FProgramIndex); 343 343 Inc(NewProgramIndex);
Note:
See TracChangeset
for help on using the changeset viewer.