Changeset 207 for branches/interpreter2/UFormMain.pas
- Timestamp:
- Apr 20, 2020, 11:31:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/UFormMain.pas
r206 r207 15 15 TFormMain = class(TForm) 16 16 ACompile: TAction; 17 AOptimize: TAction; 17 18 AExit: TAction; 18 19 ARun: TAction; … … 40 41 procedure AGeneratePascalExecute(Sender: TObject); 41 42 procedure AGeneratePhpExecute(Sender: TObject); 43 procedure AOptimizeExecute(Sender: TObject); 42 44 procedure ARunExecute(Sender: TObject); 43 45 procedure FormActivate(Sender: TObject); … … 66 68 uses 67 69 UParser, UExecutor, UGeneratorPascal, UGeneratorPhp, UFormMessages, UFormSource, 68 UGeneratorCSharp ;70 UGeneratorCSharp, UOptimizer; 69 71 70 72 { TFormMain } … … 121 123 begin 122 124 ACompile.Execute; 125 AOptimize.Execute; 123 126 MemoOutput.Lines.Clear; 124 127 if Assigned(Prog) then begin … … 137 140 begin 138 141 ACompile.Execute; 142 AOptimize.Execute; 139 143 MemoOutput.Lines.Clear; 140 144 if Assigned(Prog) then begin … … 164 168 end; 165 169 170 procedure TFormMain.AOptimizeExecute(Sender: TObject); 171 var 172 Optimizer: TOptimizer; 173 begin 174 if Assigned(Prog) then begin 175 Optimizer := TOptimizer.Create; 176 Optimizer.Prog := Prog; 177 Optimizer.Optimize; 178 Optimizer.Free; 179 end; 180 end; 181 166 182 procedure TFormMain.ARunExecute(Sender: TObject); 167 183 var … … 169 185 begin 170 186 ACompile.Execute; 187 //AOptimize.Execute; 171 188 MemoOutput.Lines.Clear; 172 189 if Assigned(Prog) then begin
Note:
See TracChangeset
for help on using the changeset viewer.