The "function trampoline" that's described looks more or less like the Block ABI. Some good learning is available in the source for `libclosure`, [Language Specification for Blocks](http://www.opensource.apple.com/source/libclosure/libclosure...) and [Block Implementation Specification](http://www.opensource.apple.com/source/libclosure/libclosure...).
----
Consistently being able to hook functions in Swift is going to be a pain in release mode optimizations, as the Swift compiler does aggressive inlining.