Changeset 152


Ignore:
Timestamp:
Jun 6, 2024, 9:10:15 PM (7 months ago)
Author:
chronos
Message:
  • Fixed: A typo in interpreter target name.
Location:
trunk
Files:
10 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r150 r152  
    7272  LazFileUtils, FormMain, FormEx,
    7373  // Targets
    74   TargetInterpretter, TargetFPC, TargetJava, TargetDelphi, TargetJavascript,
     74  TargetInterpreter, TargetFPC, TargetJava, TargetDelphi, TargetJavascript,
    7575  TargetPHP, TargetC, TargetPython, TargetCSharp, TargetRust;
    7676
     
    146146  with Targets do begin
    147147    Clear;
    148     Add(TTargetInterpretter.Create);
     148    Add(TTargetInterpreter.Create);
    149149    Add(TTargetDelphi.Create);
    150150    Add(TTargetFPC.Create);
     
    187187    ThemeManager.Theme := ThemeManager.Themes.FindByName(ReadStringWithDefault('Theme', 'System'));
    188188
    189     TargetName := ReadStringWithDefault('TargetName', 'Interpretter');
     189    TargetName := ReadStringWithDefault('TargetName', 'Interpreter');
    190190    CurrentTarget := Targets.FindByName(TargetName);
    191191    if not Assigned(CurrentTarget) then
  • trunk/Forms/FormCPU.pas

    r149 r152  
    3232
    3333uses
    34   Core, TargetInterpretter;
     34  Core, TargetInterpreter;
    3535
    3636{$R *.lfm}
     
    4343procedure TFormCPU.Reload;
    4444begin
    45   if Core.Core.CurrentTarget is TTargetInterpretter then
    46   with TTargetInterpretter(Core.Core.CurrentTarget) do begin
     45  if Core.Core.CurrentTarget is TTargetInterpreter then
     46  with TTargetInterpreter(Core.Core.CurrentTarget) do begin
    4747    LabelProgramPointer.Caption := IntToStr(ProgramIndex);
    4848    LabelMemoryPointer.Caption := IntToStr(MemoryPosition);
  • trunk/Forms/FormInput.pas

    r149 r152  
    2323
    2424uses
    25   Core, TargetInterpretter;
     25  Core, TargetInterpreter;
    2626
    2727procedure TFormInput.MemoInputKeyPress(Sender: TObject; var Key: char);
    2828begin
    29   if Core.Core.CurrentTarget is TTargetInterpretter then
    30   with TTargetInterpretter(Core.Core.CurrentTarget) do
     29  if Core.Core.CurrentTarget is TTargetInterpreter then
     30  with TTargetInterpreter(Core.Core.CurrentTarget) do
    3131    Input := Input + Key;
    3232end;
  • trunk/Forms/FormMain.pas

    r149 r152  
    136136    procedure AShowTargetPositionExecute(Sender: TObject);
    137137    procedure AViewCompilersExecute(Sender: TObject);
    138     procedure AViewInterpretterExecute(Sender: TObject);
     138    procedure AViewInterpreterExecute(Sender: TObject);
    139139    procedure AViewLogExecute(Sender: TObject);
    140140    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     
    176176
    177177uses
    178   Core, TargetInterpretter, BFTarget, Common, FormAbout;
     178  Core, TargetInterpreter, BFTarget, Common, FormAbout;
    179179
    180180resourcestring
     
    403403procedure TFormMain.AProgramRunExecute(Sender: TObject);
    404404begin
    405   if Core.Core.CurrentTarget is TTargetInterpretter then
    406     TTargetInterpretter(Core.Core.CurrentTarget).Input := FormInput.MemoInput.Lines.Text;
     405  if Core.Core.CurrentTarget is TTargetInterpreter then
     406    TTargetInterpreter(Core.Core.CurrentTarget).Input := FormInput.MemoInput.Lines.Text;
    407407  if not Core.Core.CurrentTarget.Compiled then AProgramCompile.Execute;
    408408  Core.Core.CurrentTarget.Run;
     
    442442end;
    443443
    444 procedure TFormMain.AViewInterpretterExecute(Sender: TObject);
     444procedure TFormMain.AViewInterpreterExecute(Sender: TObject);
    445445begin
    446446  FormCPU.Show;
  • trunk/Forms/FormMemory.pas

    r149 r152  
    2828
    2929uses
    30   Core, TargetInterpretter;
     30  Core, TargetInterpreter;
    3131
    3232{ TFormMemory }
     
    3434procedure TFormMemory.Reload;
    3535begin
    36   if Core.Core.CurrentTarget is TTargetInterpretter then
    37   with TTargetInterpretter(Core.Core.CurrentTarget) do begin
     36  if Core.Core.CurrentTarget is TTargetInterpreter then
     37  with TTargetInterpreter(Core.Core.CurrentTarget) do begin
    3838    if MemoryChanged then begin
    3939      MemoryChanged := False;
     
    5151  Address: Integer;
    5252begin
    53   if Core.Core.CurrentTarget is TTargetInterpretter then
    54   with TTargetInterpretter(Core.Core.CurrentTarget) do
     53  if Core.Core.CurrentTarget is TTargetInterpreter then
     54  with TTargetInterpreter(Core.Core.CurrentTarget) do
    5555  if (Item.Index >= 0) and (Item.Index <= Trunc((MemoryMaxUsedAddr + 1) / RowSize)) then begin
    5656    Item.Caption := IntToHex(Item.Index * RowSize, 8);
  • trunk/Forms/FormOutput.pas

    r149 r152  
    2424
    2525uses
    26   Core, TargetInterpretter;
     26  Core, TargetInterpreter;
    2727
    2828{ TFormOutput }
     
    3030procedure TFormOutput.Reload;
    3131begin
    32   if Core.Core.CurrentTarget is TTargetInterpretter then
    33   with TTargetInterpretter(Core.Core.CurrentTarget) do begin
     32  if Core.Core.CurrentTarget is TTargetInterpreter then
     33  with TTargetInterpreter(Core.Core.CurrentTarget) do begin
    3434    if OutputChanged then begin
    3535      OutputChanged := False;
  • trunk/Languages/LazFuck.cs.po

    r150 r152  
    168168msgstr "Zastaveno"
    169169
    170 #: targetinterpretter.sbreakpointindexerror
     170#: targetinterpreter.sbreakpointindexerror
    171171#, object-pascal-format
    172 msgctxt "targetinterpretter.sbreakpointindexerror"
     172msgctxt "targetinterpreter.sbreakpointindexerror"
    173173msgid "Break point index error: %d"
    174174msgstr "Chyba indexu bodu přerušení: %d"
    175175
    176 #: targetinterpretter.sjumptablecollision
    177 msgctxt "targetinterpretter.sjumptablecollision"
     176#: targetinterpreter.sjumptablecollision
     177msgctxt "targetinterpreter.sjumptablecollision"
    178178msgid "Jump table collision"
    179179msgstr "Kolize v tabulce skoků"
    180180
    181 #: targetinterpretter.sjumptableinconsistent
    182 msgctxt "targetinterpretter.sjumptableinconsistent"
     181#: targetinterpreter.sjumptableinconsistent
     182msgctxt "targetinterpreter.sjumptableinconsistent"
    183183msgid "Jump table is inconsistent"
    184184msgstr "Nekonzistentní skoková tabulka"
    185185
    186 #: targetinterpretter.sprogramlowermemorylimit
    187 msgctxt "targetinterpretter.sprogramlowermemorylimit"
     186#: targetinterpreter.sprogramlowermemorylimit
     187msgctxt "targetinterpreter.sprogramlowermemorylimit"
    188188msgid "Program run over lower memory limit"
    189189msgstr "Program překročil dolní rozsah paměti"
    190190
    191 #: targetinterpretter.sprogramnotrunning
    192 msgctxt "targetinterpretter.sprogramnotrunning"
     191#: targetinterpreter.sprogramnotrunning
     192msgctxt "targetinterpreter.sprogramnotrunning"
    193193msgid "Program not running"
    194194msgstr "Program neběşí"
    195195
    196 #: targetinterpretter.sprogramuppermemorylimit
    197 msgctxt "targetinterpretter.sprogramuppermemorylimit"
     196#: targetinterpreter.sprogramuppermemorylimit
     197msgctxt "targetinterpreter.sprogramuppermemorylimit"
    198198msgid "Program run over upper memory limit"
    199199msgstr "Program překročil horní rozsah paměti"
    200200
    201 #: targetinterpretter.sunsupportedcommand
    202 msgctxt "targetinterpretter.sunsupportedcommand"
     201#: targetinterpreter.sunsupportedcommand
     202msgctxt "targetinterpreter.sunsupportedcommand"
    203203msgid "Unsupported command"
    204204msgstr "NepodporovanÃœ příkaz"
  • trunk/Languages/LazFuck.pot

    r150 r152  
    158158msgstr ""
    159159
    160 #: targetinterpretter.sbreakpointindexerror
     160#: targetinterpreter.sbreakpointindexerror
    161161#, object-pascal-format
    162 msgctxt "targetinterpretter.sbreakpointindexerror"
     162msgctxt "targetinterpreter.sbreakpointindexerror"
    163163msgid "Break point index error: %d"
    164164msgstr ""
    165165
    166 #: targetinterpretter.sjumptablecollision
    167 msgctxt "targetinterpretter.sjumptablecollision"
     166#: targetinterpreter.sjumptablecollision
     167msgctxt "targetinterpreter.sjumptablecollision"
    168168msgid "Jump table collision"
    169169msgstr ""
    170170
    171 #: targetinterpretter.sjumptableinconsistent
    172 msgctxt "targetinterpretter.sjumptableinconsistent"
     171#: targetinterpreter.sjumptableinconsistent
     172msgctxt "targetinterpreter.sjumptableinconsistent"
    173173msgid "Jump table is inconsistent"
    174174msgstr ""
    175175
    176 #: targetinterpretter.sprogramlowermemorylimit
    177 msgctxt "targetinterpretter.sprogramlowermemorylimit"
     176#: targetinterpreter.sprogramlowermemorylimit
     177msgctxt "targetinterpreter.sprogramlowermemorylimit"
    178178msgid "Program run over lower memory limit"
    179179msgstr ""
    180180
    181 #: targetinterpretter.sprogramnotrunning
    182 msgctxt "targetinterpretter.sprogramnotrunning"
     181#: targetinterpreter.sprogramnotrunning
     182msgctxt "targetinterpreter.sprogramnotrunning"
    183183msgid "Program not running"
    184184msgstr ""
    185185
    186 #: targetinterpretter.sprogramuppermemorylimit
    187 msgctxt "targetinterpretter.sprogramuppermemorylimit"
     186#: targetinterpreter.sprogramuppermemorylimit
     187msgctxt "targetinterpreter.sprogramuppermemorylimit"
    188188msgid "Program run over upper memory limit"
    189189msgstr ""
    190190
    191 #: targetinterpretter.sunsupportedcommand
    192 msgctxt "targetinterpretter.sunsupportedcommand"
     191#: targetinterpreter.sunsupportedcommand
     192msgctxt "targetinterpreter.sunsupportedcommand"
    193193msgid "Unsupported command"
    194194msgstr ""
  • trunk/LazFuck.lpi

    r151 r152  
    143143      </Unit7>
    144144      <Unit8>
    145         <Filename Value="Target\TargetInterpretter.pas"/>
     145        <Filename Value="Target\TargetInterpreter.pas"/>
    146146        <IsPartOfProject Value="True"/>
    147147      </Unit8>
  • trunk/Read Me.txt

    r122 r152  
    33==Features==
    44* Graphical code editor with color syntax highlighting
    5 * Cross-compilation to Delphi, Free Pascal, Python, Java, C, C#, PHP, and JavaScript
    6 * Interpreter with debugger 
     5* Cross-compilation to Delphi, Free Pascal, Python, Java, C, C#, PHP, Rust and JavaScript
     6* Interpreter with debugger
    77* Translations: English, Czech
    88
     
    1111* Home page: https://app.zdechov.net/LazFuck/
    1212* Source code: https://svn.zdechov.net/LazFuck/
    13 * Developed in [http://www.lazarus-ide.org/ Lazarus/FPC] 2.2.0
     13* Developed in [http://www.lazarus-ide.org/ Lazarus/FPC] 3.4.0
    1414* To build new Windows installer run Install/build.bat. InnoSetup (http://www.jrsoftware.org/isdl.php) needs to be installed).
  • trunk/Target/TargetInterpreter.pas

    r151 r152  
    1 unit TargetInterpretter;
     1unit TargetInterpreter;
    22
    33interface
     
    77
    88type
    9   TTargetInterpretter = class;
    10 
    11   { TTargetInterpretterThread }
    12 
    13   TTargetInterpretterThread = class(TThread)
     9  TTargetInterpreter = class;
     10
     11  { TTargetInterpreterThread }
     12
     13  TTargetInterpreterThread = class(TThread)
    1414  private
    1515    FNewState: TRunState;
     
    1919    procedure SetStateSafe(State: TRunState);
    2020  public
    21     Parent: TTargetInterpretter;
     21    Parent: TTargetInterpreter;
    2222    procedure Execute; override;
    2323  end;
     
    2525  TCommandHandler = procedure of object;
    2626
    27   { TTargetInterpretter }
    28 
    29   TTargetInterpretter = class(TBFTarget)
     27  { TTargetInterpreter }
     28
     29  TTargetInterpreter = class(TBFTarget)
    3030  private
    3131    FThreadState: Boolean;
    32     FThread: TTargetInterpretterThread;
     32    FThread: TTargetInterpreterThread;
    3333    FStepCount: Integer;
    3434    FCommandTable: array[TMachineCommand] of TCommandHandler;
     
    8989  SBreakPointIndexError = 'Break point index error: %d';
    9090
    91 { TTargetInterpretterThread }
    92 
    93 procedure TTargetInterpretterThread.Execute;
     91{ TTargetInterpreterThread }
     92
     93procedure TTargetInterpreterThread.Execute;
    9494var
    9595  BreakPoint: TBreakPoint;
     
    130130end;
    131131
    132 procedure TTargetInterpretterThread.DoMessage;
     132procedure TTargetInterpreterThread.DoMessage;
    133133begin
    134134  Parent.SendMessage(FMessage);
    135135end;
    136136
    137 procedure TTargetInterpretterThread.DoSetState;
     137procedure TTargetInterpreterThread.DoSetState;
    138138begin
    139139  Parent.State := FNewState;
    140140end;
    141141
    142 procedure TTargetInterpretterThread.SetStateSafe(State: TRunState);
     142procedure TTargetInterpreterThread.SetStateSafe(State: TRunState);
    143143begin
    144144  if Parent.State = State then Exit;
     
    147147end;
    148148
    149 { TTargetInterpretter }
    150 
    151 procedure TTargetInterpretter.SetState(AValue: TRunState);
     149{ TTargetInterpreter }
     150
     151procedure TTargetInterpreter.SetState(AValue: TRunState);
    152152begin
    153153  if FState = AValue then Exit;
     
    156156end;
    157157
    158 procedure TTargetInterpretter.SetThread(State: Boolean);
     158procedure TTargetInterpreter.SetThread(State: Boolean);
    159159begin
    160160  if FThreadState = State then Exit;
    161161  FThreadState := State;
    162162  if State then begin
    163     FThread := TTargetInterpretterThread.Create(True);
     163    FThread := TTargetInterpreterThread.Create(True);
    164164    FThread.Parent := Self;
    165165    FThread.FreeOnTerminate := False;
     
    170170end;
    171171
    172 procedure TTargetInterpretter.PrepareJumpTable;
     172procedure TTargetInterpreter.PrepareJumpTable;
    173173type
    174174  TArrayOfInteger = array of Integer;
     
    205205end;
    206206
    207 procedure TTargetInterpretter.CommandInput;
     207procedure TTargetInterpreter.CommandInput;
    208208var
    209209  Addr: Integer;
     
    221221end;
    222222
    223 procedure TTargetInterpretter.CommandOutput;
     223procedure TTargetInterpreter.CommandOutput;
    224224begin
    225225  if OutputPosition > Length(Output) then
     
    231231end;
    232232
    233 procedure TTargetInterpretter.CommandLoopStart;
     233procedure TTargetInterpreter.CommandLoopStart;
    234234begin
    235235  if Memory[MemoryPosition + FProgram[FProgramIndex].RelIndex] = 0 then
     
    237237end;
    238238
    239 procedure TTargetInterpretter.CommandLoopEnd;
     239procedure TTargetInterpreter.CommandLoopEnd;
    240240begin
    241241  if Memory[MemoryPosition + FProgram[FProgramIndex].RelIndex] > 0 then
     
    243243end;
    244244
    245 procedure TTargetInterpretter.CommandInc;
     245procedure TTargetInterpreter.CommandInc;
    246246var
    247247  Addr: Integer;
     
    253253end;
    254254
    255 procedure TTargetInterpretter.CommandDec;
     255procedure TTargetInterpreter.CommandDec;
    256256var
    257257  Addr: Integer;
     
    263263end;
    264264
    265 procedure TTargetInterpretter.CommandPointerInc;
     265procedure TTargetInterpreter.CommandPointerInc;
    266266begin
    267267  if MemoryPosition < MemorySize then
     
    270270end;
    271271
    272 procedure TTargetInterpretter.CommandPointerDec;
     272procedure TTargetInterpreter.CommandPointerDec;
    273273begin
    274274  if MemoryPosition > 0 then
     
    277277end;
    278278
    279 procedure TTargetInterpretter.CommandSet;
     279procedure TTargetInterpreter.CommandSet;
    280280var
    281281  Addr: Integer;
     
    288288end;
    289289
    290 procedure TTargetInterpretter.CommandMultiply;
     290procedure TTargetInterpreter.CommandMultiply;
    291291var
    292292  Addr: Integer;
     
    300300end;
    301301
    302 procedure TTargetInterpretter.Reset;
     302procedure TTargetInterpreter.Reset;
    303303var
    304304  I: Integer;
     
    322322end;
    323323
    324 procedure TTargetInterpretter.Compile;
     324procedure TTargetInterpreter.Compile;
    325325begin
    326326  inherited;
     
    328328end;
    329329
    330 procedure TTargetInterpretter.PrepareBreakPoints;
     330procedure TTargetInterpreter.PrepareBreakPoints;
    331331var
    332332  I: Integer;
     
    340340end;
    341341
    342 procedure TTargetInterpretter.CheckMemoryBounds(Address: Integer);
     342procedure TTargetInterpreter.CheckMemoryBounds(Address: Integer);
    343343begin
    344344  if Address < 0 then raise Exception.Create(SProgramLowerMemoryLimit);
     
    346346end;
    347347
    348 procedure TTargetInterpretter.EmitTargetCode;
     348procedure TTargetInterpreter.EmitTargetCode;
    349349var
    350350  I: Integer;
     
    369369end;
    370370
    371 function TTargetInterpretter.GetExecutionPosition: Integer;
     371function TTargetInterpreter.GetExecutionPosition: Integer;
    372372begin
    373373  Result := FProgramIndex;
    374374end;
    375375
    376 procedure TTargetInterpretter.OptimizeSource;
     376procedure TTargetInterpreter.OptimizeSource;
    377377begin
    378378  inherited;
    379379end;
    380380
    381 procedure TTargetInterpretter.Run;
     381procedure TTargetInterpreter.Run;
    382382begin
    383383  PrepareBreakPoints;
     
    390390end;
    391391
    392 procedure TTargetInterpretter.Pause;
     392procedure TTargetInterpreter.Pause;
    393393begin
    394394  if State = rsRunning then State := rsPaused;
    395395end;
    396396
    397 procedure TTargetInterpretter.Stop;
     397procedure TTargetInterpreter.Stop;
    398398begin
    399399  State := rsStopped;
     
    401401end;
    402402
    403 procedure TTargetInterpretter.StepInto;
     403procedure TTargetInterpreter.StepInto;
    404404var
    405405  Step: TDebugStep;
     
    421421end;
    422422
    423 procedure TTargetInterpretter.StepOver;
     423procedure TTargetInterpreter.StepOver;
    424424var
    425425  Step: TDebugStep;
     
    440440end;
    441441
    442 procedure TTargetInterpretter.StepOut;
     442procedure TTargetInterpreter.StepOut;
    443443var
    444444  Step: TDebugStep;
     
    462462end;
    463463
    464 procedure TTargetInterpretter.RunToCursor(Pos: Integer);
     464procedure TTargetInterpreter.RunToCursor(Pos: Integer);
    465465begin
    466466  Breakpoints.SetSystem(Pos);
     
    468468end;
    469469
    470 constructor TTargetInterpretter.Create;
     470constructor TTargetInterpreter.Create;
    471471begin
    472472  inherited;
    473   FName := 'Interpretter';
     473  FName := 'Interpreter';
    474474  FImageIndex := 25;
    475475  FCapabilities := [tcRun, tcPause, tcStop, tcCompile, tcStepOut, tcStepInto,
     
    489489end;
    490490
    491 destructor TTargetInterpretter.Destroy;
     491destructor TTargetInterpreter.Destroy;
    492492begin
    493493  FState := rsStopped;
Note: See TracChangeset for help on using the changeset viewer.