<div dir="ltr">On Mon, Jul 8, 2013 at 8:58 AM, Jonathan Schleifer <span dir="ltr"><<a href="mailto:js@webkeks.org" target="_blank">js@webkeks.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">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).<br>

<br></blockquote><div>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.</div><div>
<br></div><div>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.</div>
<div><br></div><div>-Eli </div></div><br></div></div>