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

    r125 r126  
    6161  AddLine('');
    6262  FProgramIndex := 0;
    63   while (FProgramIndex < Length(FProgram)) do begin
     63  while FProgramIndex < FProgram.Count do begin
    6464    case FProgram[FProgramIndex].Command of
    6565      cmPointerInc: AddLine('Pos = Pos + ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
     
    7070      cmInput: ; //AddLine(GetMemoryCell + ' = getchar();');
    7171      cmSet: AddLine(GetMemoryCell + ' = ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
    72       cmMultipy: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
     72      cmMultiply: AddLine(GetMemoryCell + ' = ' + GetMemoryCell + ' + Memory[Pos] * ' + IntToStr(FProgram[FProgramIndex].Parameter) + ';');
    7373      cmLoopStart: begin
    7474        AddLine('while(' + GetMemoryCell + ' != 0)');
Note: See TracChangeset for help on using the changeset viewer.