Do ‘What’s wrong with using inline functions‘ and ‘Can a recursive function be inline‘ apply to Delphi inline functions? Furthermore, does anyone know how recursive inline functions are handled in Delphi?
Do What’s wrong with using inline functions and Can a recursive function be inline
Share
My guess is probably not since inline is only a suggestion, but lets find out.
A simple recursive factorial routine:
Here is the disassembly of the call to it:
And the disassembly of the routine itself:
Now we make it inline and see what is different in the call:
And the routine itself:
And they both appear the same to me, so I am going to stick with my original hypothesis and say they are not supported.
BTW: this is in Delphi 2009.