<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 8, 2014 at 11:58 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5">On 08.09.2014, at 20:45, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br><div><br><blockquote type="cite"><div dir="ltr">On Sun, Sep 7, 2014 at 1:58 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">David T. Lewis uploaded a new version of System to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/System-dtl.685.mcz" target="_blank">http://source.squeak.org/trunk/System-dtl.685.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: System-dtl.685<br>
Author: dtl<br>
Time: 7 September 2014, 4:58:15.377 pm<br>
UUID: 55eba121-23d3-41cc-9525-52554adac2ec<br>
Ancestors: System-eem.684<br>
<br>
Smalltalk isRunningCog should answer false for an interpreter VM<br>
<br>
=============== Diff against System-eem.684 ===============<br>
<br>
Item was changed:<br>
  ----- Method: SmalltalkImage&gt;&gt;isRunningCog (in category &#39;system attributes&#39;) -----<br>
  isRunningCog<br>
        &quot;Answers if we&#39;re running on a Cog VM (JIT or StackInterpreter)&quot;<br>
<br>
+       ^( [self vmParameterAt: 42] on: Error do: [] )<br>
-       ^(self vmParameterAt: 42)<br>
                ifNil: [false]<br>
                ifNotNil: [:numStackPages| numStackPages &gt; 0]!<br></blockquote><div><br></div><div>Instead of creating an exception handler why not modify the interpreter to answer nil?  I know the answer is that the Interpreter doesn&#39;t, and fails.  But we&#39;ve had years in which we could change the Interpreter to match vmParameterAt: and instead of doing the good thing (have the Interpreter answer nil for values answered by Cog VMs), we force the standard system to waste time.  We should optimize the common case (trunk running on Cog) not penalize it to cover the uncommon case (trunk running on Interpreter VM). </div></div></div></div></blockquote></div><div><br></div></div></div>Nah, if performance really was an issue we could just remove the primitiveFailed in vmParameterAt:. No need to change the VM.</div></blockquote><div><br></div><div>That&#39;s a good idea.  Change the primitiveFailed to ^nil.</div><div><br></div></div>-- <br>best,<div>Eliot</div>
</div></div>