SWRoute: Function Hooking in Swift
Dmitry Rodionov via (Wolf Rentzsch):
When you pass a function as an argument of a generic type
<T>
, Swift doesn’t pass its raw address directly, but a pointer to a trampoline function (see below) along with some meta information about the function. And the trampoline itself is a part of a structure wrapping the original function.