[Pas2js] Optimization

Ulrich, Christian christian.ulrich at tcsag.de
Wed Feb 26 09:57:45 CET 2020


I would like the swich too, what if the optimizer gets more intelligent some day ?
If false... seems not very problematic to detect by an optimizer some day

-----Ursprüngliche Nachricht-----
Von: Pas2js [mailto:pas2js-bounces at lists.freepascal.org] Im Auftrag von Mattias Gaertner via Pas2js
Gesendet: Mittwoch, 26. Februar 2020 09:24
An: pas2js at lists.freepascal.org
Cc: Mattias Gaertner
Betreff: Re: [Pas2js] Optimization

On Wed, 26 Feb 2020 07:43:45 +0100
pas2js at gauns.org wrote:

> Hi guys,
> 
> is it possible to switch off Optimization with a compiler directive
> 
> fa:
> 
> {$O-}
> procedure TForm1.Button1Click(Sender: TObject);
> begin
> 	WriteLn( 'Click' )
> end;
> {$O+}
> 
> 
> i just want that the optimization process do not remove this function,
> but i don't want to switch off the whole optimization

Add somewhere safe:
  if false then Button1Click(nil);

Mattias
_______________________________________________
Pas2js maillist  -  Pas2js at lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js


More information about the Pas2js mailing list