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'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'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"><<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>></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 <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
> On Mon, Apr 05, 2010 at 03:13:51PM +0300, Igor Stasenko wrote:<br>
>> Here the proof of concept implementation.<br>
><br>
><br>
>> So, here the questions, which i like to be answered:<br>
>> 1. reserve a numbered primitive<br>
><br>
> Probably a named primitive in the interpreter is best, see comment in<br>
> John's new primitiveMicrosecondClock. I don't think that there is any<br>
> performance implication once the primitive name has been resolved once.<br>
><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>
>> 2. discuss the calling convention<br>
>> 3. add a 'platform id' code to VMMaker, and let language side know ,<br>
>> on which platform id VM currently runs on (through additional<br>
>> primitive)<br>
><br>
> I'm not sure how to handle #3, but there are a lot of different CPUs<br>
> and operating systems out there, not to mention all the different modes<br>
> of say an Intel CPU. So it may not be trivial to answer the question<br>
> "can this snippet of compiled code be executed in my current runtime<br>
> environment".<br>
><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>
> Dave<br>
<div><div></div><div class="h5">><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</div></div></blockquote></div><br></div>