Changeset 125 for trunk


Ignore:
Timestamp:
Jan 14, 2022, 3:15:52 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Target/UTargetC.pas

    r124 r125  
    3030constructor TTargetC.Create;
    3131begin
    32   inherited Create;
     32  inherited;
    3333  Name := 'C';
    3434  SourceExtension := '.c';
  • trunk/Target/UTargetCSharp.pas

    r124 r125  
    2828constructor TTargetCSharp.Create;
    2929begin
    30   inherited Create;
     30  inherited;
    3131  Name := 'C#';
    3232  SourceExtension := '.cs';
  • trunk/Target/UTargetDelphi.pas

    r87 r125  
    2727constructor TTargetDelphi.Create;
    2828begin
    29   inherited Create;
     29  inherited;
    3030  Name := 'Delphi';
    3131  SourceExtension := '.pas';
     
    9696procedure TTargetDelphi.Run;
    9797begin
    98   inherited Run;
     98  inherited;
    9999  RunFromFile;
    100100end;
  • trunk/Target/UTargetFPC.pas

    r124 r125  
    2727constructor TTargetFPC.Create;
    2828begin
    29   inherited Create;
     29  inherited;
    3030  Name := 'FPC';
    3131  SourceExtension := '.pas';
     
    9898procedure TTargetFPC.Run;
    9999begin
    100   inherited Run;
     100  inherited;
    101101  RunFromFile;
    102102end;
  • trunk/Target/UTargetInterpretter.pas

    r114 r125  
    328328procedure TTargetInterpretter.OptimizeSource;
    329329begin
    330   inherited OptimizeSource;
     330  inherited;
    331331end;
    332332
     
    445445  FState := rsStopped;
    446446  SetThread(False);
    447   inherited Destroy;
     447  inherited;
    448448end;
    449449
  • trunk/Target/UTargetJava.pas

    r124 r125  
    2828constructor TTargetJava.Create;
    2929begin
    30   inherited Create;
     30  inherited;
    3131  Name := 'Java';
    3232  SourceExtension := '.java';
  • trunk/Target/UTargetJavascript.pas

    r107 r125  
    3131constructor TTargetJavascript.Create;
    3232begin
    33   inherited Create;
     33  inherited;
    3434  Name := 'Javascript';
    3535  SourceExtension := '.js';
  • trunk/Target/UTargetPHP.pas

    r124 r125  
    2828constructor TTargetPHP.Create;
    2929begin
    30   inherited Create;
     30  inherited;
    3131  Name := 'PHP';
    3232  SourceExtension := '.php';
     
    9595procedure TTargetPHP.Run;
    9696begin
    97   inherited Run;
     97  inherited;
    9898  RunFromFile;
    9999end;
  • trunk/Target/UTargetPython.pas

    r124 r125  
    2828constructor TTargetPython.Create;
    2929begin
    30   inherited Create;
     30  inherited;
    3131  Name := 'Python';
    3232  SourceExtension := '.py';
     
    133133procedure TTargetPython.Run;
    134134begin
    135   inherited Run;
     135  inherited;
    136136  RunFromFile;
    137137end;
  • trunk/UBFHighlighter.pas

    r105 r125  
    110110constructor TSynBrainFuckHl.Create(AOwner: TComponent);
    111111begin
    112   inherited Create(AOwner);
     112  inherited;
    113113
    114114  (* Create and initialize the attributes *)
  • trunk/UBFTarget.pas

    r124 r125  
    521521constructor TBFTarget.Create;
    522522begin
    523   inherited Create;
     523  inherited;
    524524  MemorySize := 30000;
    525525  CellSize := 256;
  • trunk/UCore.pas

    r124 r125  
    159159  FCurrentTarget := AValue;
    160160  for I := 0 to Targets.Count - 1 do
    161     TTarget(Targets[I]).OnChangeState := nil;
     161    Targets[I].OnChangeState := nil;
    162162  if Assigned(FCurrentTarget) then begin
    163163    FCurrentTarget.OnChangeState := FormMain.TargetStateChanged;
  • trunk/UTarget.pas

    r124 r125  
    173173begin
    174174  if Count > 0 then begin
    175     TMessage(Last).Text := TMessage(Last).Text + Text;
     175    Last.Text := Last.Text + Text;
    176176    DoChange;
    177177  end else AddMessage(Text);
     
    210210begin
    211211  for I := Count - 1 downto 0 do
    212     if TBreakPoint(Items[I]).System then Delete(I);
     212    if Items[I].System then Delete(I);
    213213end;
    214214
     
    218218begin
    219219  I := 0;
    220   while (I < Count) and (TBreakPoint(Items[I]).TargetAddress < Pos) do Inc(I);
    221   if I < Count then Result := TBreakPoint(Items[I])
     220  while (I < Count) and (Items[I].TargetAddress < Pos) do Inc(I);
     221  if I < Count then Result := Items[I]
    222222    else Result := nil;
    223223end;
     
    231231begin
    232232  I := 0;
    233   while (I < Count) and (TDebugStep(Items[I]).SourcePosition < Pos) do Inc(I);
    234   if I < Count then Result := TDebugStep(Items[I])
     233  while (I < Count) and (Items[I].SourcePosition < Pos) do Inc(I);
     234  if I < Count then Result := Items[I]
    235235    else Result := nil;
    236236end;
     
    241241begin
    242242  I := 0;
    243   while (I < Count) and (TDebugStep(Items[I]).ProgramPosition < Pos) do Inc(I);
    244   if I < Count then Result := TDebugStep(Items[I])
     243  while (I < Count) and (Items[I].ProgramPosition < Pos) do Inc(I);
     244  if I < Count then Result := Items[I]
    245245    else Result := nil;
    246246end;
     
    252252begin
    253253  I := 0;
    254   while (I < Count) and (TDebugStep(Items[I]).TargetPosition < Pos) do Inc(I);
    255   if I < Count then Result := TDebugStep(Items[I])
     254  while (I < Count) and (Items[I].TargetPosition < Pos) do Inc(I);
     255  if I < Count then Result := Items[I]
    256256    else Result := nil;
    257257end;
     
    262262begin
    263263  I := 0;
    264   while (I < Count) and (TDebugStep(Items[I]).ProgramPosition < Pos) do Inc(I);
     264  while (I < Count) and (Items[I].ProgramPosition < Pos) do Inc(I);
    265265  if I < Count then Result := I
    266266    else Result := -1;
     
    289289  Last := SearchIndexByProgramPos(OldProgramTo);
    290290  for I := Last downto First + 1 do Delete(I);
    291   TDebugStep(Items[First]).ProgramPosition := NewProgram;
    292   TDebugStep(Items[First]).TargetPosition := NewTarget;
     291  Items[First].ProgramPosition := NewProgram;
     292  Items[First].TargetPosition := NewTarget;
    293293end;
    294294
     
    304304    CurrentContext := Context;
    305305    for I := 0 to Count - 1 do
    306       TTarget(Items[I]).LoadFromRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name));
     306      Items[I].LoadFromRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name));
    307307  finally
    308308    Free;
     
    318318    CurrentContext := Context;
    319319    for I := 0 to Count - 1 do
    320     with TTarget(Items[I]) do
    321       TTarget(Items[I]).SaveToRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name));
     320    with Items[I] do
     321      Items[I].SaveToRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name));
    322322  finally
    323323    Free;
     
    330330begin
    331331  I := 0;
    332   while (I < Count) and (TTarget(Items[I]).Name <> Name) do Inc(I);
    333   if I < Count then Result := TTarget(Items[I])
     332  while (I < Count) and (Items[I].Name <> Name) do Inc(I);
     333  if I < Count then Result := Items[I]
    334334    else Result := nil;
    335335end;
     
    345345    for I := 0 to Count - 1 do begin
    346346      NewMenuItem := TMenuItem.Create(MenuItem);
    347       NewMenuItem.Caption := TTarget(Items[I]).Name;
     347      NewMenuItem.Caption := Items[I].Name;
    348348      NewMenuItem.OnClick := Action;
    349       NewMenuItem.ImageIndex := TTarget(Items[I]).ImageIndex;
    350       if TTarget(Items[I]) = CurrentTarget then NewMenuItem.Checked := True;
     349      NewMenuItem.ImageIndex := Items[I].ImageIndex;
     350      if Items[I] = CurrentTarget then NewMenuItem.Checked := True;
    351351      MenuItem.Add(NewMenuItem);
    352352    end;
     
    407407  FreeAndNil(DebugSteps);
    408408  FreeAndNil(BreakPoints);
    409   inherited Destroy;
     409  inherited;
    410410end;
    411411
     
    505505procedure TTarget.Pause;
    506506begin
    507 
    508507end;
    509508
     
    514513procedure TTarget.StepOver;
    515514begin
    516 
    517515end;
    518516
    519517procedure TTarget.StepInto;
    520518begin
    521 
    522519end;
    523520
    524521procedure TTarget.StepOut;
    525522begin
    526 
    527523end;
    528524
    529525procedure TTarget.RunToCursor(Pos: Integer);
    530526begin
    531 
    532527end;
    533528
Note: See TracChangeset for help on using the changeset viewer.