Let's take an example :
(declaim (inline myinlinefunc))
(defun myinlinefunc (a)
(* a 2))
(defun myglobalfunc (z)
(+ (myinlinefunc z) 3))
CL-USER> (trace myinlinefunc myglobalfunc)
(MYINLINEFUNC MYGLOBALFUNC)
CL-USER> (myglobalfunc 2)
0: (MYGLOBALFUNC 2)
0: MYGLOBALFUNC returned 7
7 (3 bits, #x7, #o7, #b111)
Is tracing the only way to be sure the compiler has inlined the function myinlinefunc
into myglobalfunc
?
Is there a way to see the "expanded" myglobalfunc
showing inline function calls effectively replaced by there definition, like a macroexpand ?