What is exactly the problem when evaluating stuff from Workspace and Cog?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

What is exactly the problem when evaluating stuff from Workspace and Cog?

Mariano Martinez Peck
 
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

Reply | Threaded
Open this post in threaded view
|

Re: What is exactly the problem when evaluating stuff from Workspace and Cog?

Mariano Martinez Peck
 
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:

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

Reply | Threaded
Open this post in threaded view
|

Re: What is exactly the problem when evaluating stuff from Workspace and Cog?

Henrik Sperre Johansen
 
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 <[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:

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

Reply | Threaded
Open this post in threaded view
|

Re: What is exactly the problem when evaluating stuff from Workspace and Cog?

Mariano Martinez Peck
 


On Thu, Apr 28, 2011 at 1:42 PM, Henrik Sperre Johansen <[hidden email]> wrote:
 
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 <[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:

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.

Ahaaa interesting :)
Do you know how this is done (internally)? I mean, because it needs to scape the normal execution...
 
Thans Henry,

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





--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: What is exactly the problem when evaluating stuff from Workspace and Cog?

Mariano Martinez Peck
 


On Thu, Apr 28, 2011 at 2:00 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Thu, Apr 28, 2011 at 1:42 PM, Henrik Sperre Johansen <[hidden email]> wrote:
 
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 <[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:

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.

Ahaaa interesting :)
Do you know how this is done (internally)? I mean, because it needs to scape the normal execution...
 

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

 
Thans Henry,

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





--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: What is exactly the problem when evaluating stuff from Workspace and Cog?

Eliot Miranda-2
In reply to this post by Mariano Martinez Peck
 


On Thu, Apr 28, 2011 at 5:00 AM, Mariano Martinez Peck <[hidden email]> wrote:
 


On Thu, Apr 28, 2011 at 1:42 PM, Henrik Sperre Johansen <[hidden email]> wrote:
 
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 <[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:

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.

Ahaaa interesting :)
Do you know how this is done (internally)? I mean, because it needs to scape the normal execution...

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.

 
Thans Henry,

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





--
Mariano
http://marianopeck.wordpress.com