[Vm-dev] Re: What is exactly the problem when evaluating stuff
from Workspace and Cog?
Henrik Sperre Johansen
henrik.s.johansen at veloxit.no
Thu Apr 28 11:42:34 UTC 2011
On 28.04.2011 13:25, Mariano Martinez Peck wrote:
>
>
>
> No one? and if I need to intercept this messages inside the VM, is
> there another special place than the regular #commonSend ?
>
> Thanks
>
> On Sat, Apr 16, 2011 at 4:05 PM, Mariano Martinez Peck
> <marianopeck at gmail.com <mailto:marianopeck at gmail.com>> wrote:
>
> Hi. Sorry for my ignorance, but I remember hearing about that
> evaluating stuff from a workspace may not be the best choice when
> we want to test stuff on Cog. And in fact, today I suffered that.
> I put a breakpoint in the method lookup, where the dnu is thrown.
> And then from a workspace I executed:
>
> TestCase new adasdassad
>
> And didn't stop. Then I put that in a method:
>
> MyClass >> blah
> TestCase new asdadsadasda
>
> And did MyClass new blah
>
> and the breakpoint stop....So, can someone explain me what black
> magic happens with the Workspace? is something related to the
> Compiler evaluation ?
>
> Thanks in advance,
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
IIRC, code evaluated by doits is always jitted.
Thus you won't hit a breakpoint in method lookup code which is only
invoked by non-jitted calls.
In the second case, statement MyClass blah is jitted, and (as long as
other jitting-conditions have not been met) "TestCase new asdadsadasda"
is interpreted normally, so the breakpoint is encountered.
Cheers,
Henry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110428/9ad2d923/attachment-0001.htm
More information about the Vm-dev
mailing list