[fpc-pascal] Caller agnostic procedure variables

Ryan Joseph genericptr at gmail.com
Wed Feb 16 03:14:00 CET 2022



> On Feb 15, 2022, at 11:09 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> For a global function the compiler has to generate a wrapper that gets rid of the Self parameter of the interface. 
> 

The compiler generates this interface at compile time right? And then when the scope of the calling function is entered the interface is allocated? I know that's how it works for the case when state is captured but I think you're saying this is happening any time a function reference is assigned to, even if there is no state captured. Just trying to get an understanding of the runtime cost to use these.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list