Changeset 91 for trunk/Forms/UFormMain.pas
- Timestamp:
- Jul 20, 2018, 9:41:37 AM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms
-
Property svn:ignore
set to
*.lrj
-
Property svn:ignore
set to
-
trunk/Forms/UFormMain.pas
r90 r91 7 7 uses 8 8 Classes, SysUtils, FileUtil, SynEdit, Forms, Controls, Graphics, Dialogs, 9 Menus, ActnList, ComCtrls, ExtCtrls, UTarget, Registry, URegistry, Process,9 Menus, ActnList, ComCtrls, ExtCtrls, UTarget, Registry, URegistry, 10 10 LazFileUtils; 11 11 … … 305 305 if not Assigned(Core.CurrentTarget) then 306 306 Core.CurrentTarget := TTarget(Core.Targets[0]); 307 Core.Optimizations.AddSub := ReadBoolWithDefault('OptimizationAddSubEnabled', True); 308 Core.Optimizations.Merge := ReadBoolWithDefault('OptimizationMerge', True); 309 Core.Optimizations.CopyMultiply := ReadBoolWithDefault('OptimizationCopyMultiplyEnabled', True); 310 Core.Optimizations.RelativeIndexes := ReadBoolWithDefault('OptimizationRelativeIndexesEnabled', True); 307 311 finally 308 312 Free; … … 317 321 OpenKey(Key, True); 318 322 WriteString('TargetName', Core.CurrentTarget.Name); 323 WriteBool('OptimizationAddSubEnabled', Core.Optimizations.AddSub); 324 WriteBool('OptimizationMerge', Core.Optimizations.Merge); 325 WriteBool('OptimizationCopyMultiplyEnabled', Core.Optimizations.CopyMultiply); 326 WriteBool('OptimizationRelativeIndexesEnabled', Core.Optimizations.RelativeIndexes); 319 327 finally 320 328 Free; … … 458 466 procedure TFormMain.AOptionsExecute(Sender: TObject); 459 467 begin 460 OptionsForm.Load; 461 if OptionsForm.ShowModal = mrOK then begin 462 OptionsForm.Save; 463 if Assigned(Core.CurrentTarget) then begin 464 Core.CurrentTarget.OptimizationLevel := Core.OptimizationLevel; 465 if Core.CurrentTarget is TBFTarget then begin 466 TBFTarget(Core.CurrentTarget).CellSize := Core.CellSize; 467 TBFTarget(Core.CurrentTarget).MemorySize := Core.MemorySize; 468 FormOptions := TFormOptions.Create(nil); 469 try 470 FormOptions.Load; 471 if FormOptions.ShowModal = mrOK then begin 472 FormOptions.Save; 473 if Assigned(Core.CurrentTarget) then begin 474 Core.CurrentTarget.OptimizationLevel := Core.OptimizationLevel; 475 if Core.CurrentTarget is TBFTarget then begin 476 TBFTarget(Core.CurrentTarget).CellSize := Core.CellSize; 477 TBFTarget(Core.CurrentTarget).MemorySize := Core.MemorySize; 478 end; 468 479 end; 469 480 end; 481 finally 482 FormOptions.Free; 470 483 end; 471 484 end; … … 479 492 ProjectFileName := Core.Project.FileName; 480 493 ProgramName := ExtractFileNameOnly(Core.Project.FileName); 494 if Core.CurrentTarget is TBFTarget then 495 TBFTarget(Core.CurrentTarget).Optimizations := Core.Optimizations; 481 496 Core.CurrentTarget.Messages.AddMessage(SCompileStart); 482 497 Application.ProcessMessages;
Note:
See TracChangeset
for help on using the changeset viewer.