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/Target/UTargetCSharp.pas

    r125 r126  
    7575  AddLine('Pos = 0;');
    7676  FProgramIndex := 0;
    77   while (FProgramIndex < Length(FProgram)) do begin
     77  while FProgramIndex < FProgram.Count do begin
    7878    case FProgram[FProgramIndex].Command of
    7979      cmPointerInc: AddLine('Pos += ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
     
    8484      cmInput: AddLine(GetMemoryCell + ' = (int)Console.ReadKey().KeyChar;');
    8585      cmSet: AddLine(GetMemoryCell + ' = ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
    86       cmMultipy: begin
     86      cmMultiply: begin
    8787        if FProgram[FProgramIndex].Parameter = 1 then
    8888          AddLine(GetMemoryCell + ' += Memory[Pos];')
Note: See TracChangeset for help on using the changeset viewer.