Changeset 126 for trunk/UTarget.pas


Ignore:
Timestamp:
Jan 14, 2022, 7:13:36 PM (3 years ago)
Author:
chronos
Message:
  • Modified: SetZero optimization made as separate step.
  • Fixed: Error during compilation in CopyMultiply optimization.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTarget.pas

    r125 r126  
    289289  Last := SearchIndexByProgramPos(OldProgramTo);
    290290  for I := Last downto First + 1 do Delete(I);
    291   Items[First].ProgramPosition := NewProgram;
    292   Items[First].TargetPosition := NewTarget;
    293 end;
    294 
     291  if NewProgram = -1 then begin
     292    Delete(First);
     293  end else begin
     294    if (First >= 0) and (First < Count) then begin
     295      Items[First].ProgramPosition := NewProgram;
     296      Items[First].TargetPosition := NewTarget;
     297    end else begin
     298      // Index not found, possible new command?
     299    end;
     300  end;
     301end;
    295302
    296303{ TTargetList }
Note: See TracChangeset for help on using the changeset viewer.