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/UTargetPython.pas

    r125 r126  
    104104  AddLine('position = 0');
    105105  FProgramIndex := 0;
    106   while (FProgramIndex < Length(FProgram)) do begin
     106  while FProgramIndex < FProgram.Count do begin
    107107    case FProgram[FProgramIndex].Command of
    108108      cmPointerInc: AddLine('position += ' + IntToStr(FProgram[FProgramIndex].Parameter));
     
    116116      cmInput: AddLine(GetMemoryCell + ' = ord(getchar())');
    117117      cmSet: AddLine(GetMemoryCell + ' = ' + IntToStr(FProgram[FProgramIndex].Parameter));
    118       cmMultipy: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + memory[position] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
     118      cmMultiply: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + memory[position] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
    119119      cmLoopStart: begin
    120120        AddLine('while(' + GetMemoryCell + ' != 0):');
Note: See TracChangeset for help on using the changeset viewer.