<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Jul 29, 2008 at 2:51 PM, tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org">tim@rowledge.org</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="Ih2E3d"><br>
On 29-Jul-08, at 1:24 PM, Eliot Miranda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&nbsp;What I&#39;d like to do is modify Slang so that one can mix and match components to produce the VM you want. &nbsp;In the StackVM I&#39;m working on I already have the ability to add a subclass that overrides methods in the superclass so NewObjectMemory organizes the young generation differently to ObjectMemory overriding a few methods. &nbsp;It should be easy to extend this to allow e.g. ImmutabilityInterpreter to override Interpreter and add immutability without having to rewrite the entire Interpreter class.<br>

</blockquote></div>
I&#39;m fairly sure that should have worked without any extra work since it is essentially how the codegen works anyway. What *doesn&#39;t* work is adding &nbsp;subclass and being able to use &#39;super&#39; to only slightly modify the superclass code. I tried to get it working some years ago in an attempt to make it easy to implement OS specific plugin classes more easily but it drove me too close to the edge of insanity for my liking. If you&#39;ve got *that* working I&#39;d be very pleased.</blockquote>
<div><br></div><div>The code generator I started with complains if the subclass redefines a method. Arguably this is a useful error check. &nbsp;So I modified the code generator to allow a subclass to explicitly remove superclass methods before adding its own. &nbsp;Trivial but effective.</div>
<div><br></div><div>Super is a different thing. &nbsp;I don&#39;t think there&#39;s any conceptual difficulty. &nbsp;Its simply another invocation of inlining. &nbsp;But the code generator&#39;s dictionaries of selector to method would have to be elaborated and its something I can do without for now.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Another aspect of pick&#39;n&#39;mix I&#39;d like to see working is having all the parts of the vm in plugin (or plugin-like) modules. Why insist on having the GC irrevocably bound into the core (just for one example)? Why not have a system that can startup with no GC code; let the image&#39;s policy decide which GC plugin to load dependant upon need. An ephemeral app invoked to do a tiny job and quit may need no GC functionality at all so why waste space and setup time? A server app might want to use a much more sophisticated GC than our typical desktop system. Or perhaps the system should start up and run as a simple interpreter for a while until a policy has decided that Eliot&#39;s translator plugin should be loaded. And so on.</blockquote>
<div><br></div><div>Yep. &nbsp;Makes sense.</div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
<br>
tim<br><font color="#888888">
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" target="_blank">http://www.rowledge.org/tim</a><br>
Oxymorons: Soft rock<br>
<br>
<br>
<br>
</font></blockquote></div><br></div>