<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Nil</title>
	<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/</link>
	<description>serious code</description>
	<pubDate>Tue, 06 Jan 2009 11:33:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5</generator>

	<item>
		<title>by: madfox</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-12</link>
		<pubDate>Sun, 29 May 2005 19:25:32 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-12</guid>
					<description>A pretty interesting article about Application Binary Interface of powerpc.</description>
		<content:encoded><![CDATA[	<p>A pretty interesting article about Application Binary Interface of powerpc.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Dominik Wagner</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-14</link>
		<pubDate>Mon, 30 May 2005 12:51:52 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-14</guid>
					<description>Very nice insight! Keep the good stuff coming! I never thought of [nil something] to not return a kind of zero. Thanks for pointing this out. This will help in some weird debugging moment - (i already had too much of them anyway ;-) )</description>
		<content:encoded><![CDATA[	<p>Very nice insight! Keep the good stuff coming! I never thought of [nil something] to not return a kind of zero. Thanks for pointing this out. This will help in some weird debugging moment - (i already had too much of them anyway ;-) )
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Daniel Jalkut</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-15</link>
		<pubDate>Mon, 30 May 2005 13:21:16 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-15</guid>
					<description>Cool stuff.  I had never thought much about objc_msgSend_stret, except to know that it was &quot;different.&quot;  Now you've motivated me to figure out what the new &quot;objc_msgSend_rtp&quot; calls are that I'm seeing all over the place in Tiger.

Hmm, nothing in the obj_msg_ppc.s file you linked to.  Nothing by searching ADC. Lots of stack crawls from crash descriptions by searching Google.

Aha! Obviously, I have to look at the obj_msg_ppc.s source from Tiger.  There it is, in all it's confusing (to me) glory.  It has something to do with &quot;runtime pages.&quot;  OK, on Tiger there is a copy of objc_msgSend in high-memory at address 0xfffeff00.  I guess it's some kind of performance optimization to allow apps to do an absolute branch to the subroutine.  I don't know much beyond that, but it's nice to know that it's &quot;basically just objc_msgSend&quot; :) 

I look forward to more articles like this. Good stuff!

</description>
		<content:encoded><![CDATA[	<p>Cool stuff.  I had never thought much about objc_msgSend_stret, except to know that it was &#8220;different.&#8221;  Now you&#8217;ve motivated me to figure out what the new &#8220;objc_msgSend_rtp&#8221; calls are that I&#8217;m seeing all over the place in Tiger.</p>
	<p>Hmm, nothing in the obj_msg_ppc.s file you linked to.  Nothing by searching ADC. Lots of stack crawls from crash descriptions by searching Google.</p>
	<p>Aha! Obviously, I have to look at the obj_msg_ppc.s source from Tiger.  There it is, in all it&#8217;s confusing (to me) glory.  It has something to do with &#8220;runtime pages.&#8221;  OK, on Tiger there is a copy of objc_msgSend in high-memory at address 0xfffeff00.  I guess it&#8217;s some kind of performance optimization to allow apps to do an absolute branch to the subroutine.  I don&#8217;t know much beyond that, but it&#8217;s nice to know that it&#8217;s &#8220;basically just objc_msgSend&#8221; :) </p>
	<p>I look forward to more articles like this. Good stuff!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Kevin Ballard</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-17</link>
		<pubDate>Mon, 30 May 2005 17:09:37 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-17</guid>
					<description>It's great to get an official answer on this. After tracking down a heisenbug I figured that [nil returnFloatingPointValue] probably just returned whatever was in FP1 when called, but I wasn't sure. Thanks for clearing this up (and pointing out the problem with long long as well - I didn't know about that one).</description>
		<content:encoded><![CDATA[	<p>It&#8217;s great to get an official answer on this. After tracking down a heisenbug I figured that [nil returnFloatingPointValue] probably just returned whatever was in FP1 when called, but I wasn&#8217;t sure. Thanks for clearing this up (and pointing out the problem with long long as well - I didn&#8217;t know about that one).
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Quarter Life Crisis</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-18</link>
		<pubDate>Mon, 30 May 2005 17:54:39 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-18</guid>
					<description>&lt;strong&gt;Running&lt;/strong&gt;

 Because it went rather well in November and many people asked to have another one, we are having another Running Dinner this weekend. We wanted this to be really...</description>
		<content:encoded><![CDATA[	<p><strong>Running</strong></p>
	<p> Because it went rather well in November and many people asked to have another one, we are having another Running Dinner this weekend. We wanted this to be really...
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Bjoern Kriews</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-19</link>
		<pubDate>Tue, 31 May 2005 01:16:29 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-19</guid>
					<description>Very interesting read - please keep it coming - and make sure it gets included in the docs on the runtime :-). Thank you very much.</description>
		<content:encoded><![CDATA[	<p>Very interesting read - please keep it coming - and make sure it gets included in the docs on the runtime :-). Thank you very much.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Dougal</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-21</link>
		<pubDate>Tue, 31 May 2005 05:27:23 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-21</guid>
					<description>Cool - an interesting read there. Please keep more of them coming!</description>
		<content:encoded><![CDATA[	<p>Cool - an interesting read there. Please keep more of them coming!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Cliff L. Biffle</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-24</link>
		<pubDate>Tue, 31 May 2005 15:21:59 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-24</guid>
					<description>This actually explains some oddities I was tracking down.

It pretty much supports my current policy, derived from one too many heisenbugs: &quot;Don't send to nil if you can help it.&quot;  :-)

Looking forward to more!</description>
		<content:encoded><![CDATA[	<p>This actually explains some oddities I was tracking down.</p>
	<p>It pretty much supports my current policy, derived from one too many heisenbugs: &#8220;Don&#8217;t send to nil if you can help it.&#8221;  :-)</p>
	<p>Looking forward to more!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Ian Ameline</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-25</link>
		<pubDate>Tue, 31 May 2005 18:58:13 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-25</guid>
					<description>Awesome blog -- I'll definitely be following it. 

I've recently switched my primary development machine to be my mac, and It's so much nicer.

Now -- how bad would it be (from a performance standpoint) to move 0 into fp1 when you go down that path for sending a message to nil, thus eliminating a class of bugs. And in the case of struct returns, how bad would it be to fill the return struct with all 0's in the case of sending to nil?

In my opinion, it would not result in any noticable performance penalty (I'm assuming that messages passed to nil are the exception, not the rule), and could result in increased stability of apps running on this platform.

What do you think?

Regards,
Ian Ameline,
Software Architect,
Alias Sketchbook Pro.

</description>
		<content:encoded><![CDATA[	<p>Awesome blog &#8212; I&#8217;ll definitely be following it. </p>
	<p>I&#8217;ve recently switched my primary development machine to be my mac, and It&#8217;s so much nicer.</p>
	<p>Now &#8212; how bad would it be (from a performance standpoint) to move 0 into fp1 when you go down that path for sending a message to nil, thus eliminating a class of bugs. And in the case of struct returns, how bad would it be to fill the return struct with all 0&#8217;s in the case of sending to nil?</p>
	<p>In my opinion, it would not result in any noticable performance penalty (I&#8217;m assuming that messages passed to nil are the exception, not the rule), and could result in increased stability of apps running on this platform.</p>
	<p>What do you think?</p>
	<p>Regards,<br />
Ian Ameline,<br />
Software Architect,<br />
Alias Sketchbook Pro.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: ridiculous_fish</title>
		<link>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-26</link>
		<pubDate>Tue, 31 May 2005 19:11:48 +0000</pubDate>
		<guid>http://ridiculousfish.com/blog/archives/2005/05/29/nil/#comment-26</guid>
					<description>&amp;gt; Now — how bad would it be (from a performance standpoint) to move 0 into fp1 when you go 
&amp;gt; down that path for sending a message to nil, thus eliminating a class of bugs. And in the case of
&amp;gt; struct returns, how bad would it be to fill the return struct with all 0’s in the case of sending to nil?

Moving 0 into fp1, to make float and double returns 0, would be very cheap.  And while you're at it, moving 0 into r4, to make long long returns 0, would be even cheaper.  But doing this with structs would probably require substantial runtime changes, since the objc_msgSend_stret() function doesn't know how big the struct return must be.

&amp;gt; In my opinion, it would not result in any noticable performance penalty (I’m assuming that
&amp;gt; messages passed to nil are the exception, not the rule), and could result in increased stability
&amp;gt; of apps running on this platform.

I agree with you, and I've asked this before.  The answer I was given was that Apple doesn't want to &quot;special case&quot; floats, doubles, and long longs since there's not a ready solution for the general case.

You can see &lt;a href=&quot;http://groups-beta.google.com/group/comp.lang.objective-c/browse_frm/thread/e7dd50ad0bfe6bb3/4ea095b232ff639e&quot; rel=&quot;nofollow&quot;&gt;the conversation I had on Usenet&lt;/a&gt;.
</description>
		<content:encoded><![CDATA[	<p>&gt; Now — how bad would it be (from a performance standpoint) to move 0 into fp1 when you go<br />
&gt; down that path for sending a message to nil, thus eliminating a class of bugs. And in the case of<br />
&gt; struct returns, how bad would it be to fill the return struct with all 0’s in the case of sending to nil?</p>
	<p>Moving 0 into fp1, to make float and double returns 0, would be very cheap.  And while you&#8217;re at it, moving 0 into r4, to make long long returns 0, would be even cheaper.  But doing this with structs would probably require substantial runtime changes, since the objc_msgSend_stret() function doesn&#8217;t know how big the struct return must be.</p>
	<p>&gt; In my opinion, it would not result in any noticable performance penalty (I’m assuming that<br />
&gt; messages passed to nil are the exception, not the rule), and could result in increased stability<br />
&gt; of apps running on this platform.</p>
	<p>I agree with you, and I&#8217;ve asked this before.  The answer I was given was that Apple doesn&#8217;t want to &#8220;special case&#8221; floats, doubles, and long longs since there&#8217;s not a ready solution for the general case.</p>
	<p>You can see <a href="http://groups-beta.google.com/group/comp.lang.objective-c/browse_frm/thread/e7dd50ad0bfe6bb3/4ea095b232ff639e" rel="nofollow">the conversation I had on Usenet</a>.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
