<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2013/12/23 Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 2013-12-23, at 00:24, Craig Latta &lt;<a href="mailto:craig@netjam.org">craig@netjam.org</a>&gt; wrote:<br>
<br>
&gt;&gt; Why not strip the VM down as far as possible too, and pull in<br>
&gt;&gt; additional things when needed?  Just enough VM to run a minimal<br>
&gt;&gt; Spoon. It doesn&#39;t have to be fast; it can pull in speedup methods<br>
&gt;&gt; as needed (or perhaps even swap itself for a fancier VM on the<br>
&gt;&gt; fly???).<br>
&gt;<br>
&gt;     Sure, that&#39;s the plan. I first asked someone to help with that in<br>
&gt; 1998. It&#39;s not hard. No one has decided to devote time to it. Now&#39;s your<br>
&gt; chance. :)<br>
<br>
</div>One thing would be to compile the VM without inlining. Another to remove the non-essential primitives, which have a fallback in image (*). Even more primitives could be made optional if the image had more fallbacks. Or if you knew the image wasn&#39;t going to use those primitives, which might be the case in Spoon. Also quite a bit of code is devoted to purely to optimizing - the method cache, at-caches etc.<br>

<br>
- Bert -<br>
<br>
(*) but don&#39;t be surprised if the fallback code suffers from bitrot. It is never executed on regular VMs with all the primitives in place. Having recently implemented a minimal VM I did discover those bugs ;)<br></blockquote>
<div><br></div><div>Yep, I saw at least one when I failed to change some primitive and made it accidentally fail.<br></div><div>For better testability, we could isolate the fallback code under a separate method, but that would consume a bunch of selectors and somehow be contradictory with a principle of economy - less is more.<br>
</div></div><br></div></div>