Ignore:
Timestamp:
Jan 14, 2022, 7:13:36 PM (2 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/UTargetC.pas

    r125 r126  
    7474  AddLine('Pos = 0;');
    7575  FProgramIndex := 0;
    76   while (FProgramIndex < Length(FProgram)) do begin
     76  while FProgramIndex < FProgram.Count do begin
    7777    case FProgram[FProgramIndex].Command of
    7878      cmPointerInc: AddLine('Pos = Pos + ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
     
    8383      cmInput: AddLine(GetMemoryCell + ' = getchar();');
    8484      cmSet: AddLine(GetMemoryCell + ' = ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
    85       cmMultipy: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
     85      cmMultiply: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
    8686      cmLoopStart: begin
    8787        AddLine('while(' + GetMemoryCell + ' != 0)');
Note: See TracChangeset for help on using the changeset viewer.