[Vm-dev] Simulator Question

stephane ducasse stephane.ducasse at gmail.com
Thu Jan 6 17:25:22 UTC 2011


On Jan 6, 2011, at 6:23 PM, Eliot Miranda wrote:

> Hi Gabriel,
> 
> On Thu, Jan 6, 2011 at 7:41 AM, Gabriel Hernán Barbuto <gbarbuto at gmail.com> wrote:
> 
> Hi
> 
> I am working with the InterpreterSimulator and I would like to send a
> message to an object inside the simulated environment. For example, I
> have the oop for true and I want to send it the message printString.
> 
> My question is if this is possible. I don't know if there is a way to
> send a message to an object inside the simulation. I have thought
> about tinkering with the stack and calling an interpreter method. But
> I am not sure if this will work.
> 
> I'm sure you could get it to work. To send printString to true simply push true, set messageSelector to printString (there are methods to search for strings to track down the selector) and argumentCount to 0 and send commonSend.  There are all sorts of issues.  Is the VM at a suspension point?  Will the stack be balanced?  What if a process switch happens during your message?  How can you collect the result?  But these al have answers.
> 
> What are you actually trying to do?

improving the interface of Simulator so that we can get a bit more out of the numbers :)
Igor suggested to gabriel to implement a proxy so that we accessed faster iv and other structural information.
> 
> 
> Any hint will be much appreciated. Thanks in advance.
> 
> Gabriel
> 



More information about the Vm-dev mailing list