I would think it was great, as long as I could do something like<div><br></div><div>Smalltalk hasNativeCode</div><div><br></div><div>To check if there&#39;s any of it in the image, and</div><div><br></div><div>Smalltalk purgeNativeCode</div>
<div><br></div><div>(e.g., before a release of the image)</div><div><br></div><div>I definitely don&#39;t think we should ship any native code in the image in releases...<br><br><div class="gmail_quote">On Mon, Apr 5, 2010 at 12:31 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 5 April 2010 15:42, David T. Lewis &lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt; wrote:<br>

&gt; On Mon, Apr 05, 2010 at 03:13:51PM +0300, Igor Stasenko wrote:<br>
&gt;&gt; Here the proof of concept implementation.<br>
&gt;<br>
&gt;<br>
&gt;&gt; So, here the questions, which i like to be answered:<br>
&gt;&gt; 1. reserve a numbered primitive<br>
&gt;<br>
&gt; Probably a named primitive in the interpreter is best, see comment in<br>
&gt; John&#39;s new primitiveMicrosecondClock. I don&#39;t think that there is any<br>
&gt; performance implication once the primitive name has been resolved once.<br>
&gt;<br>
</div>this is true, but numbered primitive could be inlined into an interpret() loop.<br>
Then this will make some difference :)<br>
<div class="im"><br>
&gt;&gt; 2. discuss the calling convention<br>
&gt;&gt; 3. add a &#39;platform id&#39; code to VMMaker, and let language side know ,<br>
&gt;&gt; on which platform id VM currently runs on (through additional<br>
&gt;&gt; primitive)<br>
&gt;<br>
&gt; I&#39;m not sure how to handle #3, but there are a lot of different CPUs<br>
&gt; and operating systems out there, not to mention all the different modes<br>
&gt; of say an Intel CPU. So it may not be trivial to answer the question<br>
&gt; &quot;can this snippet of compiled code be executed in my current runtime<br>
&gt; environment&quot;.<br>
&gt;<br>
</div>Well, a 2 bytes for code gives us 65536 variants. If this is not<br>
enough, we could use 32 bits for platform id code.<br>
Also, i thinking , maybe we could use masks for platform id,<br>
so, then one could generate/use the same native code for multiple<br>
kinds of OS-es.<br>
But then , a number of variants will be much more limited, because<br>
platform id will be treated as a bit field, instead of integer value.<br>
<br>
&gt; Dave<br>
<div><div></div><div class="h5">&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</div></div></blockquote></div><br></div>