<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">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><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>-- <br>best,<div>Eliot</div>
</div></div>