<br><br><div class="gmail_quote">On Thu, Jul 21, 2011 at 3:43 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"><br>
On 22 July 2011 01:33, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Jul 21, 2011 at 3:29 PM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 22 July 2011 02:04,  &lt;<a href="mailto:squeak-dev-noreply@lists.squeakfoundation.org">squeak-dev-noreply@lists.squeakfoundation.org</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
&gt;&gt; &gt; <a href="http://www.squeaksource.com/VMMaker/VMMaker.oscog-eem.108.mcz" target="_blank">http://www.squeaksource.com/VMMaker/VMMaker.oscog-eem.108.mcz</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; ==================== Summary ====================<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Name: VMMaker.oscog-eem.108<br>
&gt;&gt; &gt; Author: eem<br>
&gt;&gt; &gt; Time: 21 July 2011, 1:45:28 am<br>
&gt;&gt; &gt; UUID: 06af30e4-7c67-4259-88dc-8ee2a10499c4<br>
&gt;&gt; &gt; Ancestors: VMMaker.oscog-eem.107<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Nuke ReentrantFFIPlugin in favour of ThreadedFFIPlugin, using<br>
&gt;&gt; &gt; cppIf: COGMTVM to select threading-specific code.  This so that<br>
&gt;&gt; &gt; there only needs to be one SqueakFFIPrims.c for the reentrant<br>
&gt;&gt; &gt; (non-threaded) and threaded FFI plugins.  This is a much easier<br>
&gt;&gt; &gt; fix than somehow allowing the two files to exist side-by-side in<br>
&gt;&gt; &gt; the file system.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; :)<br>
&gt;&gt; in cmake configs we dealt with this by simply including proper plugin class.<br>
&gt;&gt; But indeed there&#39;s a lot of XyZFFIPlugins out there..<br>
&gt;<br>
&gt; You may have missed the point.  Both of these plugins emit a source file called src/vm/plugins/SqueakFFIPrims/SqueakFFIPrims.c sicne they are both different versions of the FFI plugin, one for a non-threaded VM, one for a threaded VM.  If I were to generate both of them at the same time one would overwrite the other.<br>

<br>
</div>Exactly. That&#39;s why i making sure to include only right plugin :)<br>
<div class="im"><br>
&gt; If I were to change the name of one of them then all the builds would be affected and have to be modified to choose a different source depending on whether COGMTVM=1 or COGMTVM=0.  [Note it was difficult enough to get the builds to choose either cointerp.c cointerpmt.c gcc3x-cointerp.c or gcc3x-cointerpmt.c].  So the easiest way to be able to select these different variants is to collapse them into one class and use cppIf: to choose between non-threaded and threaded code based on COGMTVM.<br>

<br>
</div>I know. But its a pity that nice and elegant inheritance scheme has to<br>
be broken to serve pervasive needs of C :)<br></blockquote><div><br></div><div>except that inheritance only gives you one axis of change.  For example I have inheritance giving me the axis from less sophisticated to more sophisticated code generator in Cogit SimpleStackBasedCogit StackToRegisterMappingCogit Sista StackToRegisterMappingCogit.  But in adding Newspeak I needed another axis.  Mixins and/or traits would have worked, but I&#39;m not ready to trust the traits system, and we don&#39;t have mixins.  For that reason and the file collision issue I used cppIf: :(</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;">
<div class="im"><br>
&gt; HTH<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Best regards,<br>
&gt;&gt; Igor Stasenko AKA sig.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; best,<br>
&gt; Eliot<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div>--<br>
<div><div></div><div class="h5">Best regards,<br>
Igor Stasenko AKA sig.<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>best,<div>Eliot</div><br>