<br><br><div class="gmail_quote">On Sun, Nov 21, 2010 at 3:48 PM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com">marianopeck@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;">
 <br><br><br><div class="gmail_quote">On Sun, Nov 21, 2010 at 8:18 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<div><br>
On Sat, Nov 20, 2010 at 08:41:44PM +0100, Mariano Martinez Peck wrote:<br>
&gt;<br>
&gt; On Sat, Nov 20, 2010 at 7:50 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;wrote:<br>
&gt; &gt;<br>
&gt; &gt; On Sat, Nov 20, 2010 at 10:28 AM, Mariano Martinez Peck &lt;<br>
&gt; &gt; <a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt; &gt;<br>
</div><div>&gt; &gt;&gt; It doesn&#39;t work here. It seems I cannot use SmallInteger like methods. The<br>
&gt; &gt;&gt; #run:with:in: is never call and the image crashes.<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt; That&#39;s simply a bug and we should fix it.  What crashes, the Interpreter,<br>
&gt; &gt; Cog or both?  Prepare a reproducible test case (image, change set etc) and<br>
&gt; &gt; we can try and fix this.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; To reproduce just file in the attached cs. Then evaluate the following:<br>
&gt;<br>
&gt; TestCase methodDict at: #assert: put: 4.<br>
&gt; TestCase new assert: &#39;zaraza&#39;.<br>
&gt;<br>
&gt; If works, you should have a debugger in SmallInteger &gt;&gt; #run:with:in:<br>
&gt; otherwise, a crash.<br>
&gt;<br>
&gt; I&#39;ve tested in mac vms like:<br>
&gt;<br>
&gt; Squeak 4.2.5beta1U<br>
&gt; Squeak 5.8b4<br>
&gt;<br>
&gt; and it crash.<br>
&gt; In Squeak 64-32 5.7b1   it just hangs forever (I guess at some point it will<br>
&gt; crash).<br>
&gt;<br>
&gt; And in Cog it works perfect!  The problem is that I am using my own VM and I<br>
&gt; cannot use COG. So, if Cog has fixed this, I would like to know the changes<br>
&gt; so that to apply it to my VM.<br>
&gt;<br>
&gt; Maybe it is already fixed in latest VMMaker, but I couldn&#39;t compile<br>
&gt; it....(other story)<br>
&gt;<br>
<br>
</div>It is definitely not fixed in the latest VMMaker (interpreter).<br>
<br></blockquote><div><br><br>Thanks Dave. Then I guess it was integrated in Cog by Eliot, or maybe just a side effect in Eliot changes that automagically fixed this?<br></div></div></blockquote><div><br></div><div>Yes.  When I did run:as:in: support for Cog I fixed this.  I introduced</div>
<div><br></div><div>isOopCompiledMethod: oop</div><div>    &quot;Answer whether the oop is an object of compiled method format&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;api&gt;</div>
<div>    ^(self isNonIntegerObject: oop) and: [(self formatOf: oop) &gt;= 12]</div><div><br></div><div>and used it in the relevant places.  perhaps you could look at the usage in Cog and apply the same to the interpreter?</div>
<div><br></div><div>The existing method is</div><div><div><br></div><div>isCompiledMethod: oop</div><div>    &quot;Answer whether the argument object is of compiled method format&quot;</div><div>    ^(self formatOf: oop) &gt;= 12</div>
</div><div><br></div><div>and may crash if given a SmallInteger (alas on x86 it won&#39;t always crash :) ).</div><div><br></div><div>best</div><div>Eliot</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><br>best regards,<br><br>Mariano<br></div></div>
<br></blockquote></div><br>