[Pas2js] Optimization

pas2js at gauns.org pas2js at gauns.org
Wed Feb 26 13:49:43 CET 2020


> For the time being: Put the procedure in a published section of a 
> class.
> The compiler will not remove it then.

Great Michael
published works perfect

thanks
peter


> 
> Michael.
> 
> On Wed, 26 Feb 2020, Ulrich, Christian wrote:
> 
>> 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
>> _______________________________________________
>> Pas2js maillist  -  Pas2js at lists.freepascal.org
>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
> 
> _______________________________________________
> Pas2js maillist  -  Pas2js at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js


More information about the Pas2js mailing list