Ignore:
Timestamp:
Jan 17, 2018, 1:11:56 PM (7 years ago)
Author:
chronos
Message:
  • Added: Check memory leaks in debug build mode.
  • Fixed: Various memory leaks.
Location:
branches/easy compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/easy compiler

    • Property svn:ignore
      •  

        old new  
        22*.exe
        33*.lps
         4heaptrclog.trc
  • branches/easy compiler/USourceGenerator.pas

    r143 r145  
    8181    with TSourceFunctionCall(Instruction) do begin
    8282      if Name = 'print' then begin
    83         Result := Result + IndentStr + 'Write(' + GenerateRef(Parameters[0]) + ');' +
     83        Result := Result + IndentStr + 'Write(' + GenerateRef(TSourceReference(Parameters[0])) + ');' +
    8484          LineEnding;
    8585      end else
    8686      if Name = 'println' then begin
    87         Result := Result + IndentStr + 'WriteLn(' + GenerateRef(Parameters[0]) + ');' +
     87        Result := Result + IndentStr + 'WriteLn(' + GenerateRef(TSourceReference(Parameters[0])) + ');' +
    8888          LineEnding;
    8989      end else
    9090      if Name = 'assign' then begin
    91         Result := Result + IndentStr + GenerateRef(Parameters[0]) + ' := ' +
    92           GenerateRef(Parameters[1]) + ';' + LineEnding;
     91        Result := Result + IndentStr + GenerateRef(TSourceReference(Parameters[0])) + ' := ' +
     92          GenerateRef(TSourceReference(Parameters[1])) + ';' + LineEnding;
    9393      end else
    9494      if Name = 'inputln' then begin
    95         Result := Result + IndentStr + 'ReadLn(' + GenerateRef(Parameters[0]) + ');' + LineEnding;
     95        Result := Result + IndentStr + 'ReadLn(' + GenerateRef(TSourceReference(Parameters[0])) + ');' + LineEnding;
    9696      end else
    9797      if Name = 'increment' then begin
    98         Result := Result + IndentStr + 'Inc(' + GenerateRef(Parameters[0]) + ', ' +
    99           GenerateRef(Parameters[1]) + ');' + LineEnding;
     98        Result := Result + IndentStr + 'Inc(' + GenerateRef(TSourceReference(Parameters[0])) + ', ' +
     99          GenerateRef(TSourceReference(Parameters[1])) + ');' + LineEnding;
    100100      end else
    101101      raise Exception.Create('Unsupported instruction name.');
Note: See TracChangeset for help on using the changeset viewer.