<div dir="ltr"><div dir="ltr">On Tue, Jun 9, 2020 at 8:20 PM Dukc via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tuesday, 9 June 2020 at 00:36:18 UTC, Manu wrote:<br>
> for instance, if you have a leaf function (does not allocate <br>
> any stack memory), it's only possible to make calls from that <br>
> function where the callee is inlined... and if inlining fails, <br>
> your caller will lose its no-stack-frame requirement.<br>
<br>
Out of interest: What does implementing a function without a <br>
stack frame enable?<br></blockquote><div><br></div><div>Leaf functions have a massive performance advantage, and in certain situations, functions can run in a zero-ram or zero-stack environment; micro controllers, within scheduler implementations while performing operations like context switching, come constructs of hardware exception handling, etc.</div><div>The most common case is maintaining a leaf function's leaf-ness.</div></div></div>