<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Martok <<a href="mailto:listbox@martoks-place.de">listbox@martoks-place.de</a>> schrieb am Sa., 21. Juli 2018, 17:12:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 21.07.2018 um 02:08 schrieb Sven Barth via fpc-devel:<br>
> The main problem is that not all functions that would be eligible for your<br>
> approach are also declared as inline thus their node trees would not be stored<br>
> inside the PPU and thus you could not work with them.<br>
I'm not sure I understand. Isn't the same true, with a new feature? The full<br>
node tree must be available, which basically means "has inlineinfo". Doesn't it?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Correct. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> Additional benefit of the "pure" modifier: the compiler can check once the<br>
> method has been parsed whether it's pure or not and can thus error out in the<br>
> latter case.<br>
That is true, it is a more explicit declaration of intent.<br>
Maybe the codegen of pure can simply be implemented as generating inline info,<br>
but always replacing the calls with the simplified version. If it is already<br>
known that a function is pure, what I did with constexpr() would basically be<br>
guaranteed to work.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Pure functions would still have an ordinary generated body as there is no reason that their address shouldn't be able to be taken (otherwise one needs to declare wrappers for them). Other than that I personally favor the explicit declaration of intent for such functions without the need for a ConstExpr intrinsic. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>