help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inline function expansion


From: Philip Kaludercic
Subject: Re: inline function expansion
Date: Sun, 07 May 2023 19:48:14 +0000

Lynn Winebarger <owinebar@gmail.com> writes:

> Hi,
>
> Is there a function that will let us see the result of inline function
> expansion at the source level?   I see "byte-compile-preprocess" and
> "byte-compile-inline-expand" as possibilities, but neither has a
> docstring.

What I usually do is just to invoke M-x disassemble, but you won't be
viewing the code transformation on source-level.  I am not sure if
inlineing happens on a s-expression level like with macros, or if the
byte-code optimiser just inlines the definition instead of generating
code funcall.

> If I use define-inline, I would like to be able to verify that the
> result is what I expect, or vice versa, that I understand what the
> result will be well enough to have the correct expectation.

Isn't the idea of inlining that the behaviour/effect of invoking a
function shouldn't change, just that the resulting code might be more
efficient?

> Thanks,
> Lynn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]