[Vm-dev] Simulator Question

Gabriel Hernán Barbuto gbarbuto at gmail.com
Thu Jan 6 17:34:30 UTC 2011


Eliot

Thanks for your reply. I have just clarified what I am trying to
achieve in the response to Andreas mail and Stef already answered your
question. I was sure that a lot of issues will pop up and that I would
have to find answers to them.

For know I have loaded an image, and I want to inspect the objects.
This seems to be the easy case. Because the VM is not really running
so I think I won't get into any of the situations that you mentioned.

But I think that to be able to provide a general wrapper for oops I
will have to work on the things you mentioned. It's good to hear that
it's doable and that there are answers for all the issues.

I will try to implement the simple case and see how it works. I still
need to find how to get at the printString selector but the
information you provided will set me on the right track.

Thanks again.

Cheers
Gabriel

On Thu, Jan 6, 2011 at 6:23 PM, Eliot Miranda <eliot.miranda at gmail.com> 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?
>>
>> Any hint will be much appreciated. Thanks in advance.
>>
>> Gabriel
>
>
>


More information about the Vm-dev mailing list