Ignore:
Timestamp:
Jul 15, 2023, 12:51:15 AM (16 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from unit names.
  • Fixed: Memory leaks.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/CpuSingleSize/Assembler.pas

    r237 r238  
    1 unit UAssembler;
     1unit Assembler;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UInstructions, UCpu, Generics.Collections,
    7   UMemory, UMessages, UParser;
     6  Classes, SysUtils, Instructions, Cpu, Generics.Collections,
     7  Memory, Message, Parser;
    88
    99type
     
    3636    LabelRefs: TList<TLabelRef>;
    3737    Variables: TDictionary<string, Integer>;
    38     Messages: TMessages;
     38    Message: TMessages;
    3939    procedure Error(Text: string; Pos: TPoint);
    4040    procedure Compile(Source: string);
     
    9595procedure TAssembler.Error(Text: string; Pos: TPoint);
    9696begin
    97   Messages.AddMessage(Text, Pos);
     97  Message.AddMessage(Text, Pos);
    9898  if Assigned(FOnError) then
    9999    FOnError(Text, Pos);
     
    102102procedure TAssembler.Compile(Source: string);
    103103begin
    104   Messages.Clear;
     104  Message.Clear;
    105105  Memory.Size := 0;
    106106  Labels.Clear;
     
    319319  Parser := TParser.Create;
    320320  Parser.OnError := Error;
    321   Messages := TMessages.Create;
     321  Message := TMessages.Create;
    322322  Memory := TMemory.Create;
    323323  InstructionSet := TInstructionSet.Create;
     
    334334  FreeAndNil(InstructionSet);
    335335  FreeAndNil(Memory);
    336   FreeAndNil(Messages);
     336  FreeAndNil(Message);
    337337  FreeAndNil(Parser);
    338338  inherited;
Note: See TracChangeset for help on using the changeset viewer.