On Mon, Jul 8, 2013 at 8:58 AM, Jonathan Schleifer <[email protected]> wrote:

> I just noticed that in this patch, I also handle fpret differently, even
> though that should not be necessary for forwarding (or is there an
> architecture where it is?). The idea was originally that this would make
> sending to nil more robust, however, what an fpret is is highly platform
> dependent. Therefore I'm not sure if also having objc_msg_send_fpret is a
> good idea. Any opinions on that? (I think the compiler should handle nil
> messaging for everything that does not return an integer type - this seems
> to be the only way to always do it right).
>
> If you are going to call a function for nil receivers, you have to have a
specialized fpret form for x86-32: otherwise, the program will misbehave
due to mismatched push/pop on the FP stack.

That said, it wouldn't be unreasonable to just nil-check before any call
that doesn't have an integer/pointer return; on the Mac side, we actually
do such a check anyway for structs because we zero-initialize them.

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to