What does 'inline' mean?

Manu turkeyman at gmail.com
Tue Jun 9 14:25:42 UTC 2020


On Tue, Jun 9, 2020 at 8:20 PM Dukc via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Tuesday, 9 June 2020 at 00:36:18 UTC, Manu wrote:
> > for instance, if you have a leaf function (does not allocate
> > any stack memory), it's only possible to make calls from that
> > function where the callee is inlined... and if inlining fails,
> > your caller will lose its no-stack-frame requirement.
>
> Out of interest: What does implementing a function without a
> stack frame enable?
>

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.
The most common case is maintaining a leaf function's leaf-ness.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20200610/32a04ced/attachment.htm>


More information about the Digitalmars-d mailing list