Hi All,<div><br></div><div>   there are new versions of both the SimpleStackBasedCogit and the StackToRegisterMappingCogit Cog VMs in <a href="http://www.mirandabanda.org/files/Cog/VM/VM.r2337/">VM.r2337/</a> &amp; <a href="http://www.mirandabanda.org/files/Cog/VM/VM.r2338/">VM.r2338/</a> respectively.  These contain fixes for another bad pc mapping bug that could cause hard crashes when jitting on a backward branch in a looping interpreted method.  If you&#39;re trying to reproduce Cog crashes please upgrade to one of tthese two VMs.</div>
<div><br></div><div>TIA</div><div>and happy new 2011, P.S.  according to an FBF</div><div><span class="Apple-style-span" style="font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; line-height: 14px; "><span>RT @dpp RT @giuliodeluise 2011 is a prime number &amp; the sum of 11 consecutive prime numbers: 2011=157+163+167+173+179+181+1</span><span class="word_break" style="display: block; float: left; margin-left: -10px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "></span>91+193+197+199+211</span><br>
<br><div class="gmail_quote">Eliot</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Dec 30, 2010 at 6:02 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@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;">Hi All,<div><br></div><div>     I&#39;ve released a new version of Cog that has a substantially improved code generator along the lines of Peter Deutsch&#39;s HPS (VisualWorks) and various of Ian Piumarta&#39;s VMs.  These all use a simple tecnique to identify constant references in bytecode and to support a register-based calling convention.  While this does produce faster code it tends to accelerate low-level code much more than high-level code as you can see by the following benchmarks:</div>

<div><br></div><div><div>SimpleStackBasedCogit: [1 to: 100000000 do: [:i|]] timeToRun 691</div><div>StackToRegisterMappingCogit: [1 to: 100000000 do: [:i|]] timeToRun 192</div><div>192 - 691 / 6.91 -72%</div><div><br></div>

<div>SimpleStackBasedCogit: 0 tinyBenchmarks &#39;753495217 bytecodes/sec; 64769127 sends/sec&#39;</div><div>StackToRegisterMappingCogit: 0 tinyBenchmarks &#39;931756141 bytecodes/sec; 128157989 sends/sec&#39;</div><div>
931756141 - 753495217 / 7534952.17 -24%</div>
<div>128157989 - 64769127 / 647691.27 -98%</div><div><br></div><div>SimpleStackBasedCogit: [Compiler recompileAll] timeToRun 47013 (no transcript</div><div>StackToRegisterMappingCogit: [Compiler recompileAll] timeToRun 43406 (no transcript)</div>

<div>43406 - 47013 / 470.13 -7.67234594686576</div></div><div><br></div><div>The status of this code is essentially beta.  The test suite runs the same on the new code generator as on the old, but I think there are still bugs because I get the occasional transient error.  I am therefore very interested in any reproducible errors you can find.</div>

<div><br></div><div>The VMs (<a href="http://www.mirandabanda.org/files/Cog/VM/VM.r2334/" target="_blank">http://www.mirandabanda.org/files/Cog/VM/VM.r2334/</a>) contain a few other important changes: </div><div><br></div>
<div>- a bug fix to bytecode&lt;-&gt;native pc mappng that produced incorrect results for methods containing blocks with ^-returns in them.  One symptom is incorrect highlighting of the pc in the debugger, althoguh symptoms could be much serious.</div>

<div><br></div><div>- jitting interpreted methods on backward branches.  Currently any interpreted method that performs more than 20 backward branches will be considered for JIT compilation and if it is suitable (default, &lt;= 60 literals) will be compiled to native code.</div>

<div><br></div><div>- new callback support.  I need to commit some changes to the Alien package to provide access to this but essentially the VM&#39;s callback support is now able to be ported to architectures with register-based calling conventions (ARM, PowerPC, SPARC etc).  I&#39;ll try and get the Alien code released soon, and to back-port the changes to the standard VM before the end of the holiday.</div>

<div><br></div><div>One thing that is still /not/ fixed is the lack of a SoundPlugin on win32.  Apologies.  I&#39;ll try and get a fix for this before the end of the holidays too, but time might be too tight.  There are other priorities such as harmonising the standard and Cog VMs for the 4.2 release.</div>

<div><br></div><div>best</div><div>Eliot</div><font color="#888888"><div><br></div>
</font></blockquote></div><br></div>