2 ms·
FWIW, it appears that Mulle-objc gets around this by actually changing the calling convention for Obj-C methods, so the IMP takes a single parameter (beyond sel
by lilyball 10y ago
FWIW, it appears that Mulle-objc gets around this by actually changing the calling convention for Obj-C methods, so the IMP takes a single parameter (beyond self and _cmd) which is a struct that contains all of the method parameters. This way the compiler can just synthesize the struct for you, and then objc_msgSend() itself can be written in C because it just needs to pass the pointer to the struct along to the IMP rather than messing about with forwarding arbitrary arguments.
- groovy2shoes 10y agoInteresting. Thanks!