Lack of `objc_msgSendSuper`
Hi! There is a function objc_msgSendSuper declared in Apple's obj-c runtime, but gnustep does not provide such API.
So, is there no way to call super method implementation with gnustep, right?
Are there complications with the implementation of objc_msgSendSuper in comparison with objc_msgSend? Thanks!
The recommended way of calling a superclass method with a GNU runtime is to call objc_msg_lookup_super and then call the returned IMP. This is what clang generates for message sends to super.
The GNUstep runtime also provides objc_slot_lookup_super2, which gives a cacheable object that lets the call side elide the lookup next time, though I never got around to making an LLVM optimisation use it.
Implementing objc_msgSendSuper is about as complex as implementing objc_msgSend. Both must be implemented in assembly (and therefore we need one version for every target architecture). Both have to have different variants for different ways of returning return values.
We possibly could refactor some of the assembly to handle both, but it's not been important for code size or performance.
A lot of code explicitly calls objc_msgSend (meaning porting code from Apple platforms without it was annoying), and it's also a fairly big win for code size, but that hasn't been the case for objc_msgSendSuper.
If someone wanted to implement it for all of our supported architectures, I'd be very happy to review the patches!