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

Jonathan Schleifer js at webkeks.org
Wed Jul 10 16:08:17 PDT 2013


Am 09.07.2013 um 03:37 schrieb Eli Friedman:

> On the other hand, if you care about Objective-C++, you might want to
> check the behavior for a selector returning a class with a non-trivial
> copy constructor.

Can you elaborate on what special cases I need to consider for copy constructors? Doesn't it work from the ABI-side just like a struct return?

> Okay.  Granted, you probably need to add the handling for non-integer
> messages in a followup; the current code that does this on the Mac is
> in Mac-specific code.

Yes, I planned to do that as a follow-up patch.

> This needs a regression test for both the objfw and non-objfw cases.
> (Sorry, I didn't realize it was missing before.)

Sorry, I always forget the tests :(. I already promised John McCall to better myself, yet I forget again. Shame on me!

Please see the attached patch which now includes tests (I hope I did it right, it's the first time I wrote a test). It also includes a new __has_feature called objc_msg_lookup_stret to test if forwarding on stret is safe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Issue-calls-to-objc_msg_lookup_stret-for-the-ObjFW-r.patch
Type: application/octet-stream
Size: 10369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130711/e6b9c3f6/attachment.obj>
-------------- next part --------------

--
Jonathan


More information about the cfe-commits mailing list