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 |
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 <[hidden email]> 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: -- 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 |
On Thu, Apr 28, 2011 at 1:42 PM, Henrik Sperre Johansen <[hidden email]> wrote:
Ahaaa interesting :) Do you know how this is done (internally)? I mean, because it needs to scape the normal execution... Thans Henry,
-- Mariano http://marianopeck.wordpress.com |
On Thu, Apr 28, 2011 at 2:00 PM, Mariano Martinez Peck <[hidden email]> wrote:
What I mean is....at least, the first time it needs to do the method lookup. Otherwise how he can jitted if he didn't find the compiled method first? but of course, this can be done in another method and that's why the breakpoint didn't stop. thanks
-- Mariano http://marianopeck.wordpress.com |
In reply to this post by Mariano Martinez Peck
On Thu, Apr 28, 2011 at 5:00 AM, Mariano Martinez Peck <[hidden email]> wrote:
You're the one who's looking at the VM. Why don't you try and trace execution of a doit (hint, the method is now executed via primitive 188 withArgs:executeMethod:)? Read the code in the VM. You might even find the comment that explains it.
|
Free forum by Nabble | Edit this page |