ObjFW runtime: Add objc_msg_lookup(_super)_{fp,st}ret

Jonathan Schleifer js at webkeks.org
Mon Jul 8 14:38:39 PDT 2013


Am 08.07.2013 um 22:21 schrieb Eli Friedman:

> If you ignore nil-messaging, you don't need any of these specialized
> versions: objc_msg_lookup can always return a pointer to a function of
> an appropriate type without any special knowledge of what that type
> is.

Actually, not quite. objc_msg_lookup does not know that the returned function returns a struct. Thus the normal forwarding handler is returned instead of the stret forwarding handler. This is why my patch adds objc_msg_send_stret, which returns the correct forwarding handler for stret.

The question now is if there is need on any architecture for a special fpret forwarding handler. I can't think of any (I know x86, amd64, ppc, arm and mips don't need one), thus the question is if there is any architecture out there that would need a different forwarding handler for fpret.

--
Jonathan



More information about the cfe-commits mailing list