[fpc-pascal] _Release call location for unused function results

Maciej Izak hnb.code at gmail.com
Tue Jan 30 15:07:12 CET 2018


2018-01-30 14:40 GMT+01:00 Marco van de Voort <marcov at stack.nl>:

> Have you tested this with large methods? The trouble is we only get
> reports/code from people for whom the hack succeeded, not from ones that
> tried and failed.
>
> I can remember from one of the bugreports or mail threads about very large
> procedure bodies (where FPC hit virtual register numbers) that Delphi
> starts
> to deallocate temps earlier depending on procedure size and maybe used
> language constructs.  (number of structured temps?) That was mostly
> strings,
> but might also go for interfaces. I can also imagine that one would like
> to disable this in case recursion is detected.
>

Yes I am aware of this. In the case of interfaces for large methods all
seems works as presented for simple example. I was not able to reproduce
this problem for interfaces.


> > Seems like the SCOPEDINTERFACEDESTROY mode-switch is necessary.
>
> No, one could also simply fix the relevant code.
>

I am not the fan of SCOPEDINTERFACEDESTROY. My first impression about this
was : WTF. In some cases is almost impossible to fix large legacy (and
often wrong) code base.


> > question is: would we like to enabling this for all Delphi modes?
>
> Everything that needs this is essentially feature abuse. I would not enable
> it by default


+1 . Anyway I am still considering : commit or not :P.

-- 
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180130/b5221d07/attachment.html>


More information about the fpc-pascal mailing list