<br><br><div class="gmail_quote">On Mon, Nov 22, 2010 at 8:20 PM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>></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><div></div><div class="h5"><br>
On Mon, Nov 22, 2010 at 08:05:02PM +0100, Mariano Martinez Peck wrote:<br>
><br>
> On Mon, Nov 22, 2010 at 7:58 PM, David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
><br>
> ><br>
> > On Sun, Nov 21, 2010 at 05:06:01PM -0800, Eliot Miranda wrote:<br>
> > ><br>
> > > On Sun, Nov 21, 2010 at 3:48 PM, Mariano Martinez Peck <<br>
> > > <a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>> wrote:<br>
> > > ><br>
> > > > On Sun, Nov 21, 2010 at 8:18 PM, David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a><br>
> > >wrote:<br>
> > > >><br>
> > > >> On Sat, Nov 20, 2010 at 08:41:44PM +0100, Mariano Martinez Peck wrote:<br>
> > > >> ><br>
> > > >> > On Sat, Nov 20, 2010 at 7:50 PM, Eliot Miranda <<br>
> > <a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a><br>
> > > >> >wrote:<br>
> > > >> > ><br>
> > > >> > > On Sat, Nov 20, 2010 at 10:28 AM, Mariano Martinez Peck <<br>
> > > >> > > <a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>> wrote:<br>
> > > >> > ><br>
> > > >> > >> It doesn't work here. It seems I cannot use SmallInteger like<br>
> > > >> methods. The<br>
> > > >> > >> #run:with:in: is never call and the image crashes.<br>
> > > >> > >><br>
> > > >> > ><br>
> > > >> > > That's simply a bug and we should fix it. What crashes, the<br>
> > > >> Interpreter,<br>
> > > >> > > Cog or both? Prepare a reproducible test case (image, change set<br>
> > etc)<br>
> > > >> and<br>
> > > >> > > we can try and fix this.<br>
> > > >> > ><br>
> > > >> > ><br>
> > > >> > To reproduce just file in the attached cs. Then evaluate the<br>
> > following:<br>
> > > >> ><br>
> > > >> > TestCase methodDict at: #assert: put: 4.<br>
> > > >> > TestCase new assert: 'zaraza'.<br>
> > > >> ><br>
> > > >> > If works, you should have a debugger in SmallInteger >><br>
> > #run:with:in:<br>
> > > >> > otherwise, a crash.<br>
> > > >> ><br>
> > > >> > I've tested in mac vms like:<br>
> > > >> ><br>
> > > >> > Squeak 4.2.5beta1U<br>
> > > >> > Squeak 5.8b4<br>
> > > >> ><br>
> > > >> > and it crash.<br>
> > > >> > In Squeak 64-32 5.7b1 it just hangs forever (I guess at some point<br>
> > it<br>
> > > >> will<br>
> > > >> > crash).<br>
> > > >> ><br>
> > > >> > And in Cog it works perfect! The problem is that I am using my own<br>
> > VM<br>
> > > >> and I<br>
> > > >> > cannot use COG. So, if Cog has fixed this, I would like to know the<br>
> > > >> changes<br>
> > > >> > so that to apply it to my VM.<br>
> > > >> ><br>
> > > >> > Maybe it is already fixed in latest VMMaker, but I couldn't compile<br>
> > > >> > it....(other story)<br>
> > > >> ><br>
> > > >><br>
> > > >> It is definitely not fixed in the latest VMMaker (interpreter).<br>
> > > >><br>
> > > >><br>
> > > ><br>
> > > > Thanks Dave. Then I guess it was integrated in Cog by Eliot, or maybe<br>
> > just<br>
> > > > a side effect in Eliot changes that automagically fixed this?<br>
> > > ><br>
> > ><br>
> > > Yes. When I did run:as:in: support for Cog I fixed this. I introduced<br>
> > ><br>
> > > isOopCompiledMethod: oop<br>
> > > "Answer whether the oop is an object of compiled method format"<br>
> > > <api><br>
> > > ^(self isNonIntegerObject: oop) and: [(self formatOf: oop) >= 12]<br>
> > ><br>
> > > and used it in the relevant places. perhaps you could look at the usage<br>
> > in<br>
> > > Cog and apply the same to the interpreter?<br>
> > ><br>
> > > The existing method is<br>
> > ><br>
> > > isCompiledMethod: oop<br>
> > > "Answer whether the argument object is of compiled method format"<br>
> > > ^(self formatOf: oop) >= 12<br>
> > ><br>
> > > and may crash if given a SmallInteger (alas on x86 it won't always crash<br>
> > :)<br>
> > > ).<br>
> ><br>
> > Thanks Eliot,<br>
> ><br>
> > I put the check only into Interpreter>>lookupMethodInDictionary (not<br>
> > because<br>
> > I wanted to do it differently, but because I'm behind in my email and did<br>
> > not<br>
> > notice your message until now). This seems sufficient for the moment, and<br>
> > I'll<br>
> > make a note to apply your more general fixes in the next update.<br>
> ><br>
><br>
> Yes, because with only that change there are still problems. For example, if<br>
> you put a SmallInteger as method and then you send #perform:<br>
> Example:<br>
><br>
> TestCase methodDict at: #assert: put: 5.<br>
> (TestCase >> #assert:) perform: #literals.<br>
<br>
</div></div>I get MessageNotUnderstood: SmallInteger>>literals with your example.<br>
Is that not expected?<br></blockquote><div><br>Yes, that's perfect....grrrr maybe it a another thing, I cannot remember :(<br>maybe TestCase new perform: #assert: ?<br><br>Anyway, if I can reproduce it again, I'll let you know.<br>
<br>Thanks!<br><br>mariano<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Dave<br>
<br>
</blockquote></div><br>